On Wed, Dec 18, 2019 at 03:37:49PM +0800, Xingyu Chen wrote:Thanks for your guidance.
Hi, Guenter MartinJust add of_platform_default_populate() call and clean-up calls. That's
On 2019/12/16 21:30, Guenter Roeck wrote:
On 12/15/19 10:03 PM, Xingyu Chen wrote:Thanks for your reply, if i take the wdt node as child of secure monitor
Hi, MartinThe watchdog driver needs the meson SM's dt node, and it depends on the
Sorry for the late reply.
On 2019/12/13 4:05, Martin Blumenstingl wrote:
Hi Xingyu and Rob,Your understanding is correct.
On Thu, Dec 12, 2019 at 1:20 PM Xingyu Chen
<xingyu.chen@xxxxxxxxxxx> wrote:
[...]
+examples:in v3 of this patch Rob commented that there shouldn't be an OF node
+Â - |
+ÂÂÂ watchdog {
+ÂÂÂÂÂÂÂÂÂ compatible = "amlogic,meson-sec-wdt";
+ÂÂÂÂÂÂÂÂÂ timeout-sec = <60>;
+ÂÂÂ };
if there are no additional properties
with timeout-sec there's now an additional property so my
understanding is that it's fine to have an OF node
what I don't understand yet is where this node should be placed.IMO, Although the watchdog node need to reference the meson_sm
is it supposed to be a child node of the secure monitor node (for
which we already have a binding here:
Documentation/devicetree/bindings/firmware/meson/meson_sm.txt) or
where else would we place it inside the .dts?
node, there is no
bus-like dependencies between the devices which the two nodes
corresponding to.
so i think that the watchdog node as child node of meson_sm maybe
not appropriate.
existence
of that node. That seems enough of a relationship to warrant having it
as child note.
(sm), how should
i register or find the wdt device ?
I only think of the following three methods :
1). update the sm driverïand scan®ister wdt device when the sm driver
probes(It is like i2c), but there
are too many changes involved.
not what I'd call 'too many changes'.
2). add "simple-bus" key string to compatible of sm node, and it will makeYou previously said it's not a bus...
the child node is registered as
platform device, but it seems that the key string is not match current
scene.
secure-monitor {.
 compatible = "amlogic,meson-gxbb-sm", "simple-bus";
ÂÂÂ watchdog {
ÂÂÂ ÂÂÂ compatible = "amlogic,meson-sec-wdt";
ÂÂÂ ÂÂÂ timeout-sec = <60>;
ÂÂÂ }
}
3). don't register device, and find directly the watchdog node by using the
of_* API in watchdog
driver (Eg: linux-4.x/drivers/tee/optee/core.c)
secure-monitor {
ÂÂÂ compatible = "amlogic,meson-gxbb-sm";
ÂÂÂ watchdog {
ÂÂÂÂÂÂÂ compatible = "amlogic,meson-sec-wdt";
ÂÂÂÂÂÂÂ timeout-sec = <60>;
ÂÂÂ }
}
The method 3 looks better for me, do you have a better suggestion ? Thanks
BR
Guenter
.