Thread (30 messages) 30 messages, 9 authors, 2018-12-17

Re: [PATCH 3/3] dt-bindings: net: dsa: add new bindings MT7530

flat view

From: Andrew Lunn <andrew@lunn.ch>
Date: 2018-12-03 13:21:22

quoted
I don't think any of these properties are necessary, if you can either
use a compatible string, and/or infer the actual model at runtime in the
driver's probe function, then you can assess based on that chip model as
There is an ID register in the 7530 - though I don't know if the lower
16 bits of it can tell us enough information about the device. For me on
the MT7621 they return "0001", I assume it is a revsion ID of some type.
Problem is we do not read that until after the regulators and some of
the clocking is setup.
Hi Greg

I would suggest you refactor the code, so you know the ID early
on. Reading such an ID is very common in device drivers, to decide
what to do. The silicon is generally more reliable than device tree
when it comes to identification.

The only time you need a different device tree compatibly string is
when you cannot actually get to the ID, e.g. you need to turn some
clock on, or the ID is in a different place.

     Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help