lkml.org 
[lkml]   [2021]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] net: allwinner: reset control support
Hi,

On Tue, Mar 09, 2021 at 04:21:15AM +0300, Evgeny Boger wrote:
> 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 <boger@wirenboard.com>
> ---
> .../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

>
> 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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-03-10 09:42    [W:0.062 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site