Re: [PATCH v2 1/2] net: allwinner: reset control support
From: Maxime Ripard <hidden>
Date: 2021-03-10 08:41:01
Also in:
linux-devicetree, lkml
Hi, On Tue, Mar 09, 2021 at 04:21:15AM +0300, Evgeny Boger wrote:
quoted hunk ↗ jump to hunk
R40 (aka V40/A40i/T3) and A10/A20 share the same EMAC IP. However, on R40 the EMAC is gated by default. Signed-off-by: Evgeny Boger <redacted> --- .../net/allwinner,sun4i-a10-emac.yaml | 11 +++- drivers/net/ethernet/allwinner/sun4i-emac.c | 65 +++++++++++++++++-- 2 files changed, 70 insertions(+), 6 deletions(-)diff --git a/Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml index 8d8560a67abf..27f99372d153 100644 --- a/Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml +++ b/Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml@@ -15,7 +15,12 @@ maintainers: properties: compatible: - const: allwinner,sun4i-a10-emac + oneOf: + - const: allwinner,sun4i-a10-emac + - const: allwinner,sun4i-r40-emac + - items: + - const: allwinner,sun4i-r40-emac + - const: allwinner,sun4i-a10-emac
There's no need to handle the fallback case, it should have either one of the two, not both. The good news is that it simplifies the binding here too, since you can use an enum The DT binding modifications are usually in a separate patch too
quoted hunk ↗ jump to hunk
reg: maxItems: 1@@ -30,6 +35,9 @@ properties: description: Phandle to the device SRAM $ref: /schemas/types.yaml#/definitions/phandle-array + resets: + maxItems: 1 +
You should make resets required for the R40 compatible too through an if clause. It looks good otherwise, thanks! Maxime