From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C306C04AB1 for ; Mon, 13 May 2019 09:07:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E1B962146F for ; Mon, 13 May 2019 09:07:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728482AbfEMJHF (ORCPT ); Mon, 13 May 2019 05:07:05 -0400 Received: from smtp-out.xnet.cz ([178.217.244.18]:25177 "EHLO smtp-out.xnet.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727598AbfEMJHF (ORCPT ); Mon, 13 May 2019 05:07:05 -0400 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id D1888369A; Mon, 13 May 2019 11:07:01 +0200 (CEST) Received: from localhost (meh.true.cz [local]) by meh.true.cz (OpenSMTPD) with ESMTPA id f9c40b39; Mon, 13 May 2019 11:07:00 +0200 (CEST) Date: Mon, 13 May 2019 11:07:00 +0200 From: Petr =?utf-8?Q?=C5=A0tetiar?= To: Srinivas Kandagatla Cc: Maxime Ripard , Andy Duan , "davem@davemloft.net" , "netdev@vger.kernel.org" , "john@phrozen.org" , "bgolaszewski@baylibre.com" , Andrew Lunn , Florian Fainelli , Heiner Kallweit , Rob Herring , Frank Rowand , Mark Rutland , Alban Bedel , devicetree@vger.kernel.org Subject: Re: NVMEM address DT post processing [Was: Re: [PATCH net 0/3] add property "nvmem_macaddr_swap" to swap macaddr bytes order] Message-ID: <20190513090700.GW81826@meh.true.cz> Reply-To: Petr =?utf-8?Q?=C5=A0tetiar?= References: <1557476567-17397-4-git-send-email-fugang.duan@nxp.com> <1557476567-17397-3-git-send-email-fugang.duan@nxp.com> <1557476567-17397-2-git-send-email-fugang.duan@nxp.com> <1557476567-17397-1-git-send-email-fugang.duan@nxp.com> <20190510112822.GT81826@meh.true.cz> <20190510113155.mvpuhe4yzxdaanei@flea> <20190511144444.GU81826@meh.true.cz> <547abcff-103a-13b8-f42a-c0bd1d910bbc@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <547abcff-103a-13b8-f42a-c0bd1d910bbc@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Srinivas Kandagatla [2019-05-13 09:25:55]: Hi, > My initial idea was to add compatible strings to the cell so that most of > the encoding information can be derived from it. For example if the encoding > representing in your example is pretty standard or vendor specific we could > just do with a simple compatible like below: that vendor/compatible list would be quite long[1], there are hundreds of devices in current OpenWrt tree (using currently custom patch) and probably dozens currently unsupported (ASCII encoded MAC address in NVMEM). So my goal is to add some DT functionality which would cover all of these. > eth1_addr: eth-mac-addr@18a { > compatible = "xxx,nvmem-mac-address"; > reg = <0x18a 0x11>; > }; while sketching the possible DT use cases I came to the this option as well, it was very compeling as it would kill two birds with one stone (fix outstanding MTD/NVMEM OF clash as well[2]), but I think, that it makes more sense to add this functionality to nvmem core so it could be reused by other consumers, not just by network layer. 1. https://git.openwrt.org/?p=openwrt%2Fopenwrt.git&a=search&h=HEAD&st=grep&s=mtd-mac-address 2. https://lore.kernel.org/netdev/20190418133646.GA94236@meh.true.cz -- ynezz