Watchdog device on RK3328 (Rock64)

This is for ARMv8 based devices

Re: Watchdog device on RK3328 (Rock64)

Postby TheSaint » Wed Sep 26, 2018 12:03 pm

Hey Summers, my most heartfelt praises.
I feel that eastern people are not giving detailed information. It may be a fact of translation.
TheSaint
 
Posts: 346
Joined: Mon Jul 23, 2018 7:57 am

Re: Watchdog device on RK3328 (Rock64)

Postby berturion » Wed Sep 26, 2018 5:44 pm

Thank you summers for this VERY detailed post and for all your efforts to go a little forward. I understand that these people are busy, no problem.

This document http://opensource.rock-chips.com/images ... 170321.pdf page 325, chapter 13, is describing the watchdog device. But, as I understand this is not enough detailed, or lacks information ?
I found it from this page : http://opensource.rock-chips.com/wiki_Main_Page

I would like to ask the necessary information to fix the device tree to service [at] rock-chips [dot] com, it is their official contact mailbox. But I am not sure what to ask exactly. Could you help me formulate it please ?

Maybe we could try to obtain these information and give them to our BIG contributor Heiko Stuebner ?

EDIT: I just realized that the document is the same as the one you mentioned :oops:
EDIT2: Getting the right PCLK gate could be enough to fix the device tree ?
berturion
 
Posts: 27
Joined: Mon Jun 18, 2018 10:54 am

Re: Watchdog device on RK3328 (Rock64)

Postby summers » Wed Sep 26, 2018 7:36 pm

Well its a working hypothesis that the device tree isn't sufficient. First need to find out what $this->bbcode_second_pass_code('', 'dw_wdt: probe of ff1a0000.watchdog failed with error -2') tells us. Then work what what information dw_wdt *must* have to work. These both require knowledge of the source code.

Clock is certainly a strong possibility, because the TRM mentions it, and the dw_wdt structures have a place for clock, and it is kinda fundamental to how a watchdog works ...

The TRM does give many details, e.g. the memory map is on page 13, so you can see where that came from. The section on clocks does say something about the watchdog, but it doesn't look solid.

Problem is it rapidly gets very technical, so even asking the right question is hard.

You *could* try experimentation - but that is unlikely to be productive, its usually better to get solid information from somewhere.

I don't know if any other distributions have working watchdog? If so with knowledge gained, you could see how they have set things up, and redo the same in arch.

But progress here is hard.

Sorry its not so positive ...
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: Watchdog device on RK3328 (Rock64)

Postby berturion » Thu Sep 27, 2018 6:54 am

I tried Armbian and watchdog status is "disabled". I inserted the "status=okay" hack in the u-boot but this leads to the same message in dmesg = "dw_wdt: probe of ff1a0000.watchdog failed with error -2".
As I understood is that the kernel used is ayufan's one.

I created an issue in the official Rockchip Kernel Repo: https://github.com/rockchip-linux/kernel/issues/123

I quoted your investigations from our thread, I hope you don't mind.
berturion
 
Posts: 27
Joined: Mon Jun 18, 2018 10:54 am

Re: Watchdog device on RK3328 (Rock64)

Postby summers » Thu Sep 27, 2018 11:11 am

Its fine to pass on my thoughts - after all I have no solutions, but the more people that show an interest, the more likely a solution can be found, and mainlined.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: Watchdog device on RK3328 (Rock64)

Postby summers » Fri Sep 28, 2018 1:20 pm

Probably related: https://github.com/torvalds/linux/blob/master/drivers/clk/rockchip/clk-rk3328.c doesn't seem to know how the wdt is wired. That seems to be the code that links the names in the .h file to what the chip is wired up as.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: Watchdog device on RK3328 (Rock64)

Postby summers » Sat Oct 06, 2018 2:17 pm

I've started a thread on the kernel mail list - where the problem probably lies, its here:

http://lists.infradead.org/pipermail/linux-rockchip/2018-October/021902.html

Don't know how much response I'll get, hopefully Heiko. If he has enough understanding of what the problem is, I'll look at mainlining a solution.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: Watchdog device on RK3328 (Rock64)

Postby berturion » Sun Oct 07, 2018 11:47 am

Thanks a lot for your help. Also, I hope this will be helpful for other Rock64 owners.
;)
berturion
 
Posts: 27
Joined: Mon Jun 18, 2018 10:54 am

Previous

Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 13 guests