All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Joakim Zhang <qiangqing.zhang@nxp.com>
Cc: David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Frank Rowand <frowand.list@gmail.com>,
	netdev <netdev@vger.kernel.org>,
	devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>
Subject: Re: [PATCH net-next 1/3] dt-bindings: net: add new properties for of_get_mac_address from nvmem
Date: Fri, 9 Apr 2021 08:49:41 -0500	[thread overview]
Message-ID: <CAL_JsqKeqvC=vP+SA3i76W5jsCWxzdiNkrmHS0uU=qXUAoVq8Q@mail.gmail.com> (raw)
In-Reply-To: <20210409090711.27358-2-qiangqing.zhang@nxp.com>

On Fri, Apr 9, 2021 at 4:07 AM Joakim Zhang <qiangqing.zhang@nxp.com> wrote:
>
> From: Fugang Duan <fugang.duan@nxp.com>
>
> Currently, of_get_mac_address supports NVMEM, some platforms

What's of_get_mac_address? This is a binding patch. Don't mix Linux
things in it.

> MAC address that read from NVMEM efuse requires to swap bytes
> order, so add new property "nvmem_macaddr_swap" to specify the
> behavior. If the MAC address is valid from NVMEM, add new property
> "nvmem-mac-address" in ethernet node.
>
> Update these two properties in the binding documentation.
>
> Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
> Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
> ---
>  .../bindings/net/ethernet-controller.yaml          | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> index e8f04687a3e0..c868c295aabf 100644
> --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> @@ -32,6 +32,15 @@ properties:
>        - minItems: 6
>          maxItems: 6
>
> +  nvmem-mac-address:
> +    allOf:
> +      - $ref: /schemas/types.yaml#definitions/uint8-array
> +      - minItems: 6
> +        maxItems: 6
> +    description:
> +      Specifies the MAC address that was read from nvmem-cells and dynamically
> +      add the property in device node;

Why can't you use local-mac-address or mac-address? Those too can come
from some other source.

> +
>    max-frame-size:
>      $ref: /schemas/types.yaml#/definitions/uint32
>      description:
> @@ -52,6 +61,11 @@ properties:
>    nvmem-cell-names:
>      const: mac-address
>
> +  nvmem_macaddr_swap:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description:
> +      swap bytes order for the 6 bytes of MAC address

So 'nvmem-mac-address' needs to be swapped or it's swapped before
writing? In any case, this belongs in the nvmem provider.

Rob

  reply	other threads:[~2021-04-09 13:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  9:07 [PATCH net-next 0/3] net: add new properties for of_get_mac_address from nvmem Joakim Zhang
2021-04-09  9:07 ` [PATCH net-next 1/3] dt-bindings: " Joakim Zhang
2021-04-09 13:49   ` Rob Herring [this message]
2021-04-12  6:38     ` Joakim Zhang
2021-04-09  9:07 ` [PATCH net-next 2/3] net: ethernet: add property "nvmem_macaddr_swap" to swap macaddr bytes order Joakim Zhang
2021-04-09  9:07 ` [PATCH net-next 3/3] of_net: add property "nvmem-mac-address" for of_get_mac_addr() Joakim Zhang
2021-04-09 18:43 ` [PATCH net-next 0/3] net: add new properties for of_get_mac_address from nvmem Jakub Kicinski
2021-04-12  6:41   ` Joakim Zhang
  -- strict thread matches above, loose matches on Subject: below --
2021-04-09  8:37 Joakim Zhang
2021-04-09  8:37 ` [PATCH net-next 1/3] dt-bindings: " Joakim Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL_JsqKeqvC=vP+SA3i76W5jsCWxzdiNkrmHS0uU=qXUAoVq8Q@mail.gmail.com' \
    --to=robh+dt@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=qiangqing.zhang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.