Welcome! Log In Create A New Profile

Advanced

2023.04 U-Boot Kirkwood - Synology DS411j

Posted by bodhi 
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 07, 2023 03:23AM
bodhi,

the fans are running fine now.
at uboot they lowered to low/normal speed. :)

DS411J> md.l 0xF1010000 8
f1010000: 01002222 03303311 33330000 33003333  ""...30...3333.3
f1010010: 00005533 00000000 00000000 00000000  3U..............
DS411J> md.l 0xF1010100 1
f1010100: 00011000                             ....
DS411J> md.l 0xF1010140 1
f1010140: 0000baa3                             ....
DS411J>

no changes when booting into debian, still running normal/low speed after login.
log attached
NIC is physically connected at the promt.

not sure what I was suppose to look for regarding SPI behavior.
Attachments:
open | download - 05-oct.bodhi.uboot-1.txt (34.3 KB)
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 07, 2023 01:19PM
dmb4312,

> the fans are running fine now.
> at uboot they lowered to low/normal speed. :)
> no changes when booting into debian, still running
> normal/low speed after login.

Cool!

> log attached
> NIC is physically connected at the promt.

Did you SSH in without problem? I saw the network is up, just want to confirm.

>
> not sure what I was suppose to look for regarding
> SPI behavior.

SPI envs still has the same problem we've been seeing. But using uEnv.txt we can live with that for now.

=======

The fan probing still failed in kernel, so we you cannot control the speed. I think I need to look at the DTS again. We know now for sure which GPIOs are for the fan in this board because the new u-boot successfully set it to medium speed.


=======

I forgot to mention the SATA test. It might work in u-boot without further change.

kwboot again, and interrupt countdown, and then

sata init
sata info
sata part

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 07, 2023 04:08PM
bodhi Wrote:
-------------------------------------------------------
> dmb4312,
>
> > the fans are running fine now.
> > at uboot they lowered to low/normal speed. :)
> > no changes when booting into debian, still
> running
> > normal/low speed after login.
>
> Cool!
>
> > log attached
> > NIC is physically connected at the promt.
>
> Did you SSH in without problem? I saw the network
> is up, just want to confirm.
SSH is working without any issues



> >
> > not sure what I was suppose to look for
> regarding
> > SPI behavior.
>
> SPI envs still has the same problem we've been
> seeing. But using uEnv.txt we can live with that
> for now.
Yes, I see.




> =======
>
> The fan probing still failed in kernel, so we you
> cannot control the speed. I think I need to look
> at the DTS again. We know now for sure which GPIOs
> are for the fan in this board because the new
> u-boot successfully set it to medium speed.
OK

> =======
>
> I forgot to mention the SATA test. It might work
> in u-boot without further change.
>
> kwboot again, and interrupt countdown, and then
>
>
> sata init
> sata info
> sata part
>


DS411J> sata init
DS411J> sata info
DS411J> sata part

no sata partition table available
there are no led lights besides the power led chirping(fast blinking) blue. both under uboot and debian
when "sata init" command is issued the drive-leds are lit orange



Edited 5 time(s). Last edit at 10/08/2023 01:42AM by dmb4312.
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 08, 2023 01:17PM
dmb4312 ,

> > > the fans are running fine now.
> > > at uboot they lowered to low/normal speed. :)
> > > no changes when booting into debian, still
> > running
> > > normal/low speed after login.

Please try this test for fan alarm.

Kwboot the Oct 5 u-boot (if you have not flashed it). Interrupt the countdown and,

Poke to turn on alarm

mw.l 0xF1010100 0x00051000

Poke to turn off alarm

mw.l 0xF1010100 0x00011000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 08, 2023 03:03PM
Please do this test for HDD 1.

Kwboot the Oct 5 u-boot (if you have not flashed it). Interrupt the countdown and,

dm tree
mw.l 0xF1010100 0x40011000
sleep 3
sata init
sata info
sata part
dm tree

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 08, 2023 03:28PM
Bodhi,

bodhi Wrote:
-------------------------------------------------------
> dmb4312 ,
>
> > > > the fans are running fine now.
> > > > at uboot they lowered to low/normal speed.
> :)
> > > > no changes when booting into debian, still
> > > running
> > > > normal/low speed after login.
>
> Please try this test for fan alarm.
>
> Kwboot the Oct 5 u-boot (if you have not flashed
> it). Interrupt the countdown and,
>
> Poke to turn on alarm
>
>
> mw.l 0xF1010100 0x00051000
>
>
> Poke to turn off alarm
>
>
> mw.l 0xF1010100 0x00011000
>


nothing happens when I issue the commands, no sound, no speed change, no output on the screen.

DS411J> mw.l 0xF1010100 0x00051000
DS411J> mw.l 0xF1010100 0x00011000
DS411J>
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 08, 2023 03:29PM
Bodhi,
please see output below.


bodhi Wrote:
-------------------------------------------------------
> Please do this test for HDD 1.
>
> Kwboot the Oct 5 u-boot (if you have not flashed
> it). Interrupt the countdown and,
>
>
> dm tree
> mw.l 0xF1010100 0x40011000
> sleep 3
> sata init
> sata info
> sata part
> dm tree
>


DS411J> dm tree
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [   ]   simple_bus            |-- mbus@f1000000
 simple_bus    1  [ + ]   simple_bus            |-- ocp@f1000000
 serial        0  [ + ]   ns16550_serial        |   |-- serial@12000
 serial        1  [   ]   ns16550_serial        |   |-- serial@12100
 timer         0  [ + ]   orion_timer           |   |-- timer@20300
 usb           0  [   ]   ehci_mvebu            |   |-- ehci@50000
 ethernet      0  [ + ]   mvgbe                 |   |-- ethernet-controller@72000
 bootdev       0  [   ]   eth_bootdev           |   |   `-- ethernet-controller@72000.boo
 ahci          0  [   ]   sata_mv_ahci          |   `-- sata@80000
 bootstd       0  [   ]   bootstd_drv           `-- bootstd
 bootmeth      0  [   ]   bootmeth_distro           `-- distro
DS411J> mw.l 0xF1010100 0x40011000
DS411J> sleep 3
DS411J> sata init
DS411J> sata info
DS411J> sata part

no sata partition table available
DS411J> dm tree
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [   ]   simple_bus            |-- mbus@f1000000
 simple_bus    1  [ + ]   simple_bus            |-- ocp@f1000000
 serial        0  [ + ]   ns16550_serial        |   |-- serial@12000
 serial        1  [   ]   ns16550_serial        |   |-- serial@12100
 timer         0  [ + ]   orion_timer           |   |-- timer@20300
 usb           0  [   ]   ehci_mvebu            |   |-- ehci@50000
 ethernet      0  [ + ]   mvgbe                 |   |-- ethernet-controller@72000
 bootdev       0  [   ]   eth_bootdev           |   |   `-- ethernet-controller@72000.boo
 ahci          0  [   ]   sata_mv_ahci          |   `-- sata@80000
 blk           0  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           1  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           2  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           3  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           4  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           5  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           6  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           7  [   ]   sata_mv_blk           |       `-- sata@80000.blk
 bootstd       0  [   ]   bootstd_drv           `-- bootstd
 bootmeth      0  [   ]   bootmeth_distro           `-- distro
DS411J>
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 08, 2023 04:26PM
dmb4312,

DS411J> dm tree
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [   ]   simple_bus            |-- mbus@f1000000
 simple_bus    1  [ + ]   simple_bus            |-- ocp@f1000000
 serial        0  [ + ]   ns16550_serial        |   |-- serial@12000
 serial        1  [   ]   ns16550_serial        |   |-- serial@12100
 timer         0  [ + ]   orion_timer           |   |-- timer@20300
 usb           0  [   ]   ehci_mvebu            |   |-- ehci@50000
 ethernet      0  [ + ]   mvgbe                 |   |-- ethernet-controller@72000
 bootdev       0  [   ]   eth_bootdev           |   |   `-- ethernet-controller@72000.boo
 ahci          0  [   ]   sata_mv_ahci          |   `-- sata@80000
 blk           0  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           1  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           2  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           3  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           4  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           5  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           6  [   ]   sata_mv_blk           |       |-- sata@80000.blk
 blk           7  [   ]   sata_mv_blk           |       `-- sata@80000.blk
 bootstd       0  [   ]   bootstd_drv           `-- bootstd
 bootmeth      0  [   ]   bootmeth_distro           `-- distro

I'm glad I asked you to do this test. It is apparently broken. So I need to reconfigure this u-boot a bit to straighten this out before we can do further test for SATA.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 10/08/2023 05:42PM by bodhi.
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 08, 2023 04:33PM
dmb4312,

> > Please try this test for fan alarm.
> >
> nothing happens when I issue the commands, no
> sound, no speed change, no output on the screen.

Ok let's try this test in Debian.

Export
/bin/echo 18 > /sys/class/gpio/export
/bin/echo "out" > /sys/class/gpio/gpio18/direction
Set it
/bin/echo 1 > /sys/class/gpio/gpio18/value

To stop the alarm (if it occured), clear it
/bin/echo 0 > /sys/class/gpio/gpio18/value

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 10/08/2023 05:24PM by bodhi.
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 08, 2023 10:49PM
Damn! how could I've missed this :) this might have explained a lot of the trouble we had getting the peripherals working.

It's a puzzle and bugging me, so I checked your stock bootlog again.

Stock boot log:
[    0.000000] Synology Hardware Version: DS411jv10-j

You have a different variation of DS41j, just like I had suspected but completely missed that good hint.

So an updated DTB is needed.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 10/08/2023 10:53PM by bodhi.
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 09, 2023 02:23PM
dmb4312 ,

Let me explain how I do these hacks, and you can use the example to play with it.


Quote

bodhi Wrote:
-------------------------------------------------------
> Please do this test for HDD 1.
>
> Kwboot the Oct 5 u-boot (if you have not flashed
> it). Interrupt the countdown and,
>
>
> dm tree
> mw.l 0xF1010100 0x40011000
> sleep 3
> sata init
> sata info
> sata part
> dm tree
> 

The test above: Turn on GPIO 30 in addition to GPIOs 12 and 16 already in the bit mask 0x00011000.

The bit positions are from right to left (0 to 31). Each digit in the 8-byte bit mask is 4 bits. So

0001000 is bit 12.
0010000 is bit 16.


To turn on bit 30, 16 and 12:

0x40011000

And unfortunately GPIO 30 had no effect.

=======

The next candidates to turn on HDD1 and HDD2 power are bits 29 and 31 (each SATA slot has its own GPIO).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 10/09/2023 03:30PM by bodhi.
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 09, 2023 04:08PM
bodhi Wrote:
-------------------------------------------------------
> dmb4312 ,
>
> Let me explain how I do these hacks, and you can
> use the example to play with it.
>
>
>
Quote

bodhi Wrote:
> -------------------------------------------------------
> > Please do this test for HDD 1.
> >
> > Kwboot the Oct 5 u-boot (if you have not
> flashed
> > it). Interrupt the countdown and,
> >
> >
> > dm tree
> > mw.l 0xF1010100 0x40011000
> > sleep 3
> > sata init
> > sata info
> > sata part
> > dm tree
> > 
>
> The test above: Turn on GPIO 30 in addition to
> GPIOs 12 and 16 already in the bit mask
> 0x00011000.
>
> The bit positions are from right to left (0 to
> 31). Each digit in the 8-byte bit mask is 4 bits.
> So
>
>
> 0001000 is bit 12.
> 0010000 is bit 16.
>
>
>
> To turn on bit 30, 16 and 12:
>
>
> 0x40011000
>
>
> And unfortunately GPIO 30 had no effect.
>
> =======
>
> The next candidates to turn on HDD1 and HDD2 power
> are bits 29 and 31 (each SATA slot has its own
> GPIO).



Bodhi,
do you mean to add 29 and then 31 in turns in addition to the 12 and 16?
I'm not sure how and what 12 and 16 do, are these generic to enable sata and then we need to add bit for drives?

so I tried 31 and 29 with no result:
mw.l 0xF1010100 0x80011000
mw.l 0xF1010100 0x20011000



not sure if I should stop sata and reinitialize again after each test-command

like this:
sata stop
mw.l 0xF1010100 0x80011000
sleep 3
sata init
sata info
sata part
dm tree
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 09, 2023 04:11PM
bodhi Wrote:
-------------------------------------------------------
> dmb4312,
>
> > > Please try this test for fan alarm.
> > >
> > nothing happens when I issue the commands, no
> > sound, no speed change, no output on the
> screen.
>
> Ok let's try this test in Debian.
>
> Export
>
> /bin/echo 18 > /sys/class/gpio/export
> /bin/echo "out" >
> /sys/class/gpio/gpio18/direction
>
> Set it
>
> /bin/echo 1 > /sys/class/gpio/gpio18/value
>
>
> To stop the alarm (if it occured), clear it
>
> /bin/echo 0 > /sys/class/gpio/gpio18/value
>

bodhi,
nothing happened when these commands are ran, then when I issued shutdown:
root@debian:~# init 0
INIT: Sending procUsing makefile-style concurrent boot in runlevel 0.
Stopping hotplug events dispatcher: systemd-udevd.
Stopping Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Stopping busybox' klogd implementation: klogd1114 (klogd)
Stopped klogd (pid 1114).
.
Stopping busybox' syslogd implementation: syslogd1071 (syslogd)
.
Saving random seed...done.
Stopping NFS kernel daemon: mountd nfsd.
Unexporting directories for NFS kernel daemon....
Asking all remaining processes to terminate...done.
All processes ended within 1 seconds...done.
Stopping RPC port mapper daemon: rpcbind.
Stopping NFS common utilities: idmapd statd.
Saving the system clock to /dev/rtc0.
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
Deconfiguring network interfaces...Removed stale PID file
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/ba:e8:e7:09:2b:f4
Sending on   LPF/eth0/ba:e8:e7:09:2b:f4
Sending on   Socket/fallback
DHCPRELEASE of 192.168.2.14 on eth0 to 192.168.2.1 port 67
done.
Will now unmount temporary filesystems:umount: /tmp unmounted
.
Will now deactivate swap:.
[  324.000546][ T1427] EXT4-fs (sdc1): re-mounted c54a00b9-fd98-4935-a1ae-5fea6a8a1992 ro. Quota mode: none.
Mounting root filesystem read-only...done.
Will now halt.
logger: 
socket /dev/log
: Connection refused
[  324.134112][ T1433] sd 3:0:0:0: [sde] Synchronizing SCSI cache
[  324.249459][ T1433] ata4: Unable to stop eDMA


[  388.314932][   T56] ata4: failed to resume link (SControl FFFFFFFF)
[  389.414928][   T56] ata4: failed to resume link (SControl FFFFFFFF)
[  390.514924][   T56] ata4: failed to resume link (SControl FFFFFFFF)
[  391.614920][   T56] ata4: failed to resume link (SControl FFFFFFFF)



Edited 1 time(s). Last edit at 10/09/2023 04:13PM by dmb4312.
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 09, 2023 05:00PM
dmb4312,

> do you mean to add 29 and then 31 in turns in
> addition to the 12 and 16?

Yes. Either individually or both at the same time is OK.

> I'm not sure how and what 12 and 16 do, are these
> generic to enable sata and then we need to add bit
> for drives?

GPIO 16 is supposed to be fan on, medium speed. GPIO 12 is LED alarm (which is not that important). They should have nothing to do with SATA.

These 2 are currently set automaticaly when u-boot starts.

>
> so I tried 31 and 29 with no result:
>
> mw.l 0xF1010100 0x80011000
> mw.l 0xF1010100 0x20011000
>

Bummer!

> not sure if I should stop sata and reinitialize
> again after each test-command
>
> like this:
>
> sata stop
> mw.l 0xF1010100 0x80011000
> sleep 3
> sata init
> sata info
> sata part
> dm tree
>

Yes. Ideally you should try 29, reboot and try 31. But in the same session is OK, too.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 09, 2023 05:02PM
dmb4312,

> nothing happened when these commands are ran, then
> when I issued shutdown:

> root@debian:~# init 0

Don't do that. Run the standard shutdown procedure, so each device will received a proper shutdown.

shutdown -h now

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 09, 2023 05:05PM
I've uploaded the Oct 09 version in the first post.

Please try the SATA GPIO tests again. I would do GPIO 30 and capture the log (I want to see how the dm tree looks like).

And then do GPIO 29, and GPIO 31.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 09, 2023 10:38PM
dmb4312,

How many wires are connecting to each of your fan?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 01:39AM
bodhi Wrote:
-------------------------------------------------------
> dmb4312,
>
> > do you mean to add 29 and then 31 in turns in
> > addition to the 12 and 16?
>
> Yes. Either individually or both at the same time
> is OK.
> > I'm not sure how and what 12 and 16 do, are
> these
> > generic to enable sata and then we need to add
> bit
> > for drives?
>
> GPIO 16 is supposed to be fan on, medium speed.
> GPIO 12 is LED alarm (which is not that
> important). They should have nothing to do with
> SATA.
>
> These 2 are currently set automaticaly when u-boot
> starts.
>
> >
> > so I tried 31 and 29 with no result:
> >
> > mw.l 0xF1010100 0x80011000
> > mw.l 0xF1010100 0x20011000
> >
>
> Bummer!
>
> > not sure if I should stop sata and reinitialize
> > again after each test-command
> >
> > like this:
> >
> > sata stop
> > mw.l 0xF1010100 0x80011000
> > sleep 3
> > sata init
> > sata info
> > sata part
> > dm tree
> >
>
> Yes. Ideally you should try 29, reboot and try 31.
> But in the same session is OK, too.


ok, will check this later again with your new uboot.
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 01:40AM
bodhi Wrote:
-------------------------------------------------------
> dmb4312,
>
> > nothing happened when these commands are ran,
> then
> > when I issued shutdown:
>
> > root@debian:~# init 0
>
> Don't do that. Run the standard shutdown
> procedure, so each device will received a proper
> shutdown.
>
>
> shutdown -h now
>


ok, thanks, good to know.
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 01:47AM
bodhi,

> How many wires are connecting to each of your fan?

I'm almost certain that there are three wires for each fan.
black, red and white



Edited 1 time(s). Last edit at 10/10/2023 01:49AM by dmb4312.
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 02:41AM
dmb4312,

> > How many wires are connecting to each of your
> fan?
>
> I'm almost certain that there are three wires for
> each fan.
> black, red and white

Good to confirm that.

I also looked a bit in the GPL source, no sight of this ds411j.

The mainline DTSI is too clever, there is no hint of what variation of Synology NAS is applicable to certain gpio fan definition :)

==============

Can you still boot to Synology DSM? there might be a fan control script in the DSM rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 12:31PM
bodhi Wrote:
-------------------------------------------------------
> dmb4312,
>
> > > How many wires are connecting to each of your
> > fan?
> >
> > I'm almost certain that there are three wires
> for
> > each fan.
> > black, red and white
>
> Good to confirm that.
>
> I also looked a bit in the GPL source, no sight of
> this ds411j.
>
> The mainline DTSI is too clever, there is no hint
> of what variation of Synology NAS is applicable to
> certain gpio fan definition :)
>
> ==============
>
> Can you still boot to Synology DSM? there might be
> a fan control script in the DSM rootfs.


Unfortunately,
I couldn't get it to work, it halted at different stages on kernel-boot
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 12:56PM
bodhi Wrote:
-------------------------------------------------------
> I've uploaded the Oct 09 version in the first
> post.
>
> Please try the SATA GPIO tests again. I would do
> GPIO 30 and capture the log (I want to see how the
> dm tree looks like).
>
> And then do GPIO 29, and GPIO 31.


here we go:
DS411J> dm tree
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [   ]   simple_bus            |-- mbus@f1000000
 simple_bus    1  [ + ]   simple_bus            `-- ocp@f1000000
 serial        0  [ + ]   ns16550_serial            |-- serial@12000
 serial        1  [   ]   ns16550_serial            |-- serial@12100
 timer         0  [ + ]   orion_timer               |-- timer@20300
 usb           0  [   ]   ehci_mvebu                |-- ehci@50000
 ethernet      0  [ + ]   mvgbe                     |-- ethernet-controller@72000
 ahci          0  [   ]   sata_mv_ahci              `-- sata@80000
DS411J> mw.l 0xF1010100 0x40011000
DS411J> sleep 3
DS411J> sata init
DS411J> sata info
DS411J> sata part

no sata partition table available
DS411J> dm tre
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [   ]   simple_bus            |-- mbus@f1000000
 simple_bus    1  [ + ]   simple_bus            `-- ocp@f1000000
 serial        0  [ + ]   ns16550_serial            |-- serial@12000
 serial        1  [   ]   ns16550_serial            |-- serial@12100
 timer         0  [ + ]   orion_timer               |-- timer@20300
 usb           0  [   ]   ehci_mvebu                |-- ehci@50000
 ethernet      0  [ + ]   mvgbe                     |-- ethernet-controller@72000
 ahci          0  [   ]   sata_mv_ahci              `-- sata@80000
 blk           0  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           1  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           2  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           3  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           4  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           5  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           6  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           7  [   ]   sata_mv_blk                   `-- sata@80000.blk
DS411J>


DS411J> sata stop
DS411J> mw.l 0xF1010100 0x80011000
DS411J> sleep 3
DS411J> sata init
DS411J> sata info
DS411J> sata part

no sata partition table available
DS411J> dm tree
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [   ]   simple_bus            |-- mbus@f1000000
 simple_bus    1  [ + ]   simple_bus            `-- ocp@f1000000
 serial        0  [ + ]   ns16550_serial            |-- serial@12000
 serial        1  [   ]   ns16550_serial            |-- serial@12100
 timer         0  [ + ]   orion_timer               |-- timer@20300
 usb           0  [   ]   ehci_mvebu                |-- ehci@50000
 ethernet      0  [ + ]   mvgbe                     |-- ethernet-controller@72000
 ahci          0  [   ]   sata_mv_ahci              `-- sata@80000
 blk           0  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           1  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           2  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           3  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           4  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           5  [   ]   sata_mv_blk                   `-- sata@80000.blk
DS411J>


DS411J> sata stop
DS411J> mw.l 0xF1010100 0x20011000
DS411J> sleep 3
DS411J> sata init
DS411J> sata info
DS411J> sata part

no sata partition table available
DS411J> dm tree
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [   ]   simple_bus            |-- mbus@f1000000
 simple_bus    1  [ + ]   simple_bus            `-- ocp@f1000000
 serial        0  [ + ]   ns16550_serial            |-- serial@12000
 serial        1  [   ]   ns16550_serial            |-- serial@12100
 timer         0  [ + ]   orion_timer               |-- timer@20300
 usb           0  [   ]   ehci_mvebu                |-- ehci@50000
 ethernet      0  [ + ]   mvgbe                     |-- ethernet-controller@72000
 ahci          0  [   ]   sata_mv_ahci              `-- sata@80000
 blk           0  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           1  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           2  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           3  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           4  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           5  [   ]   sata_mv_blk                   `-- sata@80000.blk
DS411J> 

Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 01:12PM
after some playing around with GPIOs for FAN:
lowest possible speed in percent, 25:
DS411J> mw.l 0xF1010100 0x00008000

normal speed, 50
DS411J> mw.l 0xF1010100 0x00010000

75:
DS411J> mw.l 0xF1010100 0x00018000

100:
DS411J> mw.l 0xF1010100 0x00028000
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 01:38PM
dmb4312,

> after some playing around with GPIOs for FAN:
>
> lowest possible speed in percent, 25:
> DS411J> mw.l 0xF1010100 0x00008000
> 
> normal speed, 50
> DS411J> mw.l 0xF1010100 0x00010000
> 
> 75:
> DS411J> mw.l 0xF1010100 0x00018000
> 
> 100:
> DS411J> mw.l 0xF1010100 0x00028000
>

What GPIOs are you setting in these pokes? is there a reason for each or just hacking?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 01:43PM
found an interesting page which I guess you already seen:

https://lore.kernel.org/all/52F48EC8.9020306@killerwolves.net/

The Ricoh RTC seems to be only used in the pre-2010 units.  Everything
else uses the Seiko RTC.

Most of the 1-bay and 2-bay units use the GPIOs that are multiplexed
with the built-in SATA interface activity/presence pins on mpp 20-23,
while the 4-bay units use ge01 and a PCIe SATA controller, and put the
software controlled HDD leds on mpp 36-43.

Most of the 6281 units with HDD power controls use mpp 29 and 31, while
most of the 6282 units with HDD power controls use mpp 30, 34, 44 and 45
and provide a model ID on mpp 28, 29, 46 and 47.  Pre-2012 units and
4-bay units didn't have a separate power control for HDD1.  These power
controls are presumably to limit startup current from the 12V brick
power supply.

I guess the CPU for this unit is 6281:
DS411j	Marvell Kirkwood 88F6281	1	1	✗	88f628x	DDR2 128MB
found here:
https://kb.synology.com/en-nz/DSM/tutorial/What_kind_of_CPU_does_my_NAS_have
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 01:51PM
> What GPIOs are you setting in these pokes? is
> there a reason for each or just hacking?

I was just trying to check if the leds would react by disabling 4th nibble in the row which did nothing
I then just activated its corresponding values and fan reacted but not the leds.
so lucky I would say.

still cannot understand why and how sata should react.

have seen that if I issue "sata info" just grows to new and higher numbers like seen here:
 blk           0  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           1  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           2  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           3  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           4  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           5  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           6  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           7  [   ]   sata_mv_blk                   `-- sata@80000.blk



Edited 3 time(s). Last edit at 10/10/2023 02:05PM by dmb4312.
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 02:03PM
dmb4312,

Quote

bodhi Wrote:
-------------------------------------------------------
> dmb4312,
>
> > after some playing around with GPIOs for FAN:
> >
> > lowest possible speed in percent, 25:
> > DS411J> mw.l 0xF1010100 0x00008000
> > 
> > normal speed, 50
> > DS411J> mw.l 0xF1010100 0x00010000
> > 
> > 75:
> > DS411J> mw.l 0xF1010100 0x00018000
> > 
> > 100:
> > DS411J> mw.l 0xF1010100 0x00028000
> >
>
> What GPIOs are you setting in these pokes? is
> there a reason for each or just hacking?


Cool! I saw that you tried GPIO 15,16,17.

OK so I think the next step is to modify the DTS to ignore the fan alarm for now.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 02:30PM
dmb4312,

> I was just trying to check if the leds would react
> by disabling 4th nibble in the row which did
> nothing
> I then just activated its corresponding values and
> fan reacted but not the leds.
> so lucky I would say.

That's good thinking! how we hack these things while lacking documentation.

We are posting at the same time, so make sure you reread the posts today :)

So to get the fan working in Linux I think we'll work around it (modify the DTS). Also try the Rico RTC chip.

> still cannot understand why and how sata should
> react.

> have seen that if I issue "sata info" just grows
> to new and higher numbers like seen here:
>
>  blk           0  [   ]   sata_mv_blk             
>      |-- sata@80000.blk
>  blk           1  [   ]   sata_mv_blk             
>      |-- sata@80000.blk
>  blk           2  [   ]   sata_mv_blk             
>      |-- sata@80000.blk
>  blk           3  [   ]   sata_mv_blk             
>      |-- sata@80000.blk
>  blk           4  [   ]   sata_mv_blk             
>      |-- sata@80000.blk
>  blk           5  [   ]   sata_mv_blk             
>      |-- sata@80000.blk
>  blk           6  [   ]   sata_mv_blk             
>      |-- sata@80000.blk
>  blk           7  [   ]   sata_mv_blk             
>      `-- sata@80000.blk
>

That's a bad behavior, not sure if there is bug in the driver.

=============

The fact that we have all 4 SATA drives in Linux, it is a good hint. We'll need to figure out which GPIOs are the power up GPIOs. There are many "blocks" in the mainline DTSI. I'm hoping to find out if the 1st one is hardwire, and why it was not powered up.


Please try SATA test with GPIO 34 and 35. It's far fetch, even wrong, but worth a try.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - Synology DS411j
October 10, 2023 03:03PM
bodhi Wrote:
-------------------------------------------------------
> dmb4312,
>
> > I was just trying to check if the leds would
> react
> > by disabling 4th nibble in the row which did
> > nothing
> > I then just activated its corresponding values
> and
> > fan reacted but not the leds.
> > so lucky I would say.
>
> That's good thinking! how we hack these things
> while lacking documentation.
>
> We are posting at the same time, so make sure you
> reread the posts today :)
>
> So to get the fan working in Linux I think we'll
> work around it (modify the DTS). Also try the Rico
> RTC chip.
>
> > still cannot understand why and how sata should
> > react.
>
> > have seen that if I issue "sata info" just
> grows
> > to new and higher numbers like seen here:
> >
> >  blk           0  [   ]   sata_mv_blk           
>  
> >      |-- sata@80000.blk
> >  blk           1  [   ]   sata_mv_blk           
>  
> >      |-- sata@80000.blk
> >  blk           2  [   ]   sata_mv_blk           
>  
> >      |-- sata@80000.blk
> >  blk           3  [   ]   sata_mv_blk           
>  
> >      |-- sata@80000.blk
> >  blk           4  [   ]   sata_mv_blk           
>  
> >      |-- sata@80000.blk
> >  blk           5  [   ]   sata_mv_blk           
>  
> >      |-- sata@80000.blk
> >  blk           6  [   ]   sata_mv_blk           
>  
> >      |-- sata@80000.blk
> >  blk           7  [   ]   sata_mv_blk           
>  
> >      `-- sata@80000.blk
> >
>
> That's a bad behavior, not sure if there is bug in
> the driver.
>
> =============
>
> The fact that we have all 4 SATA drives in Linux,
> it is a good hint. We'll need to figure out which
> GPIOs are the power up GPIOs. There are many
> "blocks" in the mainline DTSI. I'm hoping to find
> out if the 1st one is hardwire, and why it was not
> powered up.
>
>
> Please try SATA test with GPIO 34 and 35. It's far
> fetch, even wrong, but worth a try.

Yes, and sadly this cannot be scripted as I understand, I tried to bulk paste the command but it fails.
can this somehow be found from inside the debian?


tried with this precedure, by reinitializing the sata and using info to show new devices., tried all 32,33,34,35
DS411J> mw.l 0xF1010100 0x100008000
DS411J> sata init                  
DS411J> sata info                  
DS411J> dm tree                    
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [   ]   simple_bus            |-- mbus@f1000000
 simple_bus    1  [ + ]   simple_bus            `-- ocp@f1000000
 serial        0  [ + ]   ns16550_serial            |-- serial@12000
 serial        1  [   ]   ns16550_serial            |-- serial@12100
 timer         0  [ + ]   orion_timer               |-- timer@20300
 usb           0  [   ]   ehci_mvebu                |-- ehci@50000
 ethernet      0  [ + ]   mvgbe                     |-- ethernet-controller@72000
 ahci          0  [   ]   sata_mv_ahci              `-- sata@80000
 blk           0  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           1  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           2  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           3  [   ]   sata_mv_blk                   `-- sata@80000.blk
DS411J> mw.l 0xF1010100 0x200008000
DS411J> sata init                  
DS411J> sata info                  
DS411J> dm tree                    
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [   ]   simple_bus            |-- mbus@f1000000
 simple_bus    1  [ + ]   simple_bus            `-- ocp@f1000000
 serial        0  [ + ]   ns16550_serial            |-- serial@12000
 serial        1  [   ]   ns16550_serial            |-- serial@12100
 timer         0  [ + ]   orion_timer               |-- timer@20300
 usb           0  [   ]   ehci_mvebu                |-- ehci@50000
 ethernet      0  [ + ]   mvgbe                     |-- ethernet-controller@72000
 ahci          0  [   ]   sata_mv_ahci              `-- sata@80000
 blk           0  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           1  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           2  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           3  [   ]   sata_mv_blk                   `-- sata@80000.blk
DS411J> mw.l 0xF1010100 0x400008000
DS411J> sata init                  
DS411J> sata info                  
DS411J> dm tree                    
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [   ]   simple_bus            |-- mbus@f1000000
 simple_bus    1  [ + ]   simple_bus            `-- ocp@f1000000
 serial        0  [ + ]   ns16550_serial            |-- serial@12000
 serial        1  [   ]   ns16550_serial            |-- serial@12100
 timer         0  [ + ]   orion_timer               |-- timer@20300
 usb           0  [   ]   ehci_mvebu                |-- ehci@50000
 ethernet      0  [ + ]   mvgbe                     |-- ethernet-controller@72000
 ahci          0  [   ]   sata_mv_ahci              `-- sata@80000
 blk           0  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           1  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           2  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           3  [   ]   sata_mv_blk                   `-- sata@80000.blk
DS411J> mw.l 0xF1010100 0x800008000
DS411J> sata init                  
DS411J> sata info                  
DS411J> dm tree                    
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [   ]   simple_bus            |-- mbus@f1000000
 simple_bus    1  [ + ]   simple_bus            `-- ocp@f1000000
 serial        0  [ + ]   ns16550_serial            |-- serial@12000
 serial        1  [   ]   ns16550_serial            |-- serial@12100
 timer         0  [ + ]   orion_timer               |-- timer@20300
 usb           0  [   ]   ehci_mvebu                |-- ehci@50000
 ethernet      0  [ + ]   mvgbe                     |-- ethernet-controller@72000
 ahci          0  [   ]   sata_mv_ahci              `-- sata@80000
 blk           0  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           1  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           2  [   ]   sata_mv_blk                   |-- sata@80000.blk
 blk           3  [   ]   sata_mv_blk                   `-- sata@80000.blk
DS411J>         
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: