Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4410875rwd; Sun, 11 Jun 2023 07:05:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5V5a5/tx1/hrhnrex1as3ji2pVXt+qQMexihQc5YUsrhdsAvoUHpJxylDjI65oHMSHGZ4L X-Received: by 2002:a17:90a:b301:b0:259:aa15:80e6 with SMTP id d1-20020a17090ab30100b00259aa1580e6mr6704490pjr.23.1686492301487; Sun, 11 Jun 2023 07:05:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686492301; cv=none; d=google.com; s=arc-20160816; b=jJq791J+Rw4hLZVqbX9purtdV04mfAOneIzrOHAE2wiBvkktP+sUeTvZFvtuK0vs9r p656HfdY2+3qFOQBDvsfJzZettfpjpvnOSSpAB2ULFVhxdQ1JJg2N+wn/uJskxLUwIo/ 37m4buCbuG2pCtm+X9pmoN+NW4n4vyQMMlbp05lRFc74qPq9ZWH8IXI2daxvgcGAEupU +xsBu3tYPKffI8WmjC2Z2YfqewUzQEnFY9up6JB8HnLdC/sq6K4GlMAFTkvS3S4BibRA iTeiyI+y2ZKCbXg+wFMwsTuJQrvE48yo30CgiZLKtC9cKAb9MVj8qwNnipGEcfrpUxR1 dcww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nlpWIDDoTMDzC7Jc26F5UZA31B7vwDV86ZZqiF0p8S8=; b=zOgb+jhS1/r5qgtYJCB2b8QPbssBNzsnKfua0y91aSfsu2b3S9B72B6nQ4yp4ne8Tw yhvvtvus06gr4ey2GZBXA2aDZPNs2RAyAIrg0hAEEspsMGHvPQnKFW0QGEU5yuK7Ew5d 5hovYEOOG0T94dfYmjlKIo2LB2sa8UXCx5NdHXPc6rHQjhR5sYlMIzqcCZAQ39xROXDa br+YbLj3P9d5b14d1HhTEdSx3KmgUO15MdcQkxIOutHYiID19WQstbD8h/rMHD/wf3vP l5iHXxSPdS6L1VODe0cqt4f3fVNxAndG4uY5BKEWbqI8Hvf230NmW2M3iL40q2c7sx20 v84Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Qc1/cFgG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl9-20020a17090b384900b0024e140702efsi7656099pjb.118.2023.06.11.07.04.48; Sun, 11 Jun 2023 07:05:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Qc1/cFgG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233752AbjFKOEA (ORCPT + 99 others); Sun, 11 Jun 2023 10:04:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233656AbjFKODt (ORCPT ); Sun, 11 Jun 2023 10:03:49 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F5B3E7A for ; Sun, 11 Jun 2023 07:03:48 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f6da07ff00so35463165e9.3 for ; Sun, 11 Jun 2023 07:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686492227; x=1689084227; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nlpWIDDoTMDzC7Jc26F5UZA31B7vwDV86ZZqiF0p8S8=; b=Qc1/cFgGpeSUN7ZkGzby/fLmBnnLVcWG//gyWdXxeDM/zRAsTh7WDAA+sbhkdkH/cb 0jfMdGnffcI13iaWqG3kOfZKd5MVf8Ue79eBenE1yZEoliRf45QcHvSn2xN2oTACWae2 7qMT1O+FC3DfDG5TKKZcpNy975xveNdQMfHBH6SejuJ7JT3hpl9e7VFPdUyX7m11Gck8 WfTgJ4lIoHfVvfusu/djspZX37YxII711OUphEhlluYg17MWOqpPjvePj2FF43shkFm2 eGwLZL614ThjrCXZ4I+E7kcwK3nnRG41zYZFZbbi5t2AxEAJ/NPbd0+Ii4VgxBPWyIAe izuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686492227; x=1689084227; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nlpWIDDoTMDzC7Jc26F5UZA31B7vwDV86ZZqiF0p8S8=; b=ikum5M945RK0SqgSPi4cCP6QmSveJJaOY0PH90P89lmyP5QkYnApE/hLZgKjMkyf8B xJm119BpruBHTV9Mb044cqi4KnWG668I2qvcfTl9TH8Dj7yzLxWfZ1WGNlybiHjCtE3L fSoLIE/kSvvVl6Ra9MZLTkhAq/u34JUUv9QA8GbT/ocuf8zuXFG+8g9O0qmAtVRaGFJJ V3Tu+YfgMYkRe1JY2YZUuBK60auJgWNZKjcMCZ236BHDk4Hpd0Ayq7pTcHSlLB0JRhSG Ft3ipZO5aDm54DS6IuR2USugaQaFnaXWmhn3GEO3Qq2UMPqE+lxwXkiKh9VRAJztG3Eq n0xw== X-Gm-Message-State: AC+VfDzRmUEei17bjyPL68mhoCB5j8FwcoTPTP8fbYspJlKTVHFva1Gg LTNCxtx7bpt2+t0kIqB+V5i5xnyLD+m03PGwq10= X-Received: by 2002:a05:600c:2147:b0:3f4:16bc:bd19 with SMTP id v7-20020a05600c214700b003f416bcbd19mr5526149wml.23.1686492226979; Sun, 11 Jun 2023 07:03:46 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id h17-20020a05600c28d100b003f080b2f9f4sm8567222wmd.27.2023.06.11.07.03.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Jun 2023 07:03:45 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Rob Herring , Srinivas Kandagatla Subject: [PATCH 03/26] dt-bindings: nvmem: brcm,nvram: add #nvmem-cell-cells for MACs Date: Sun, 11 Jun 2023 15:03:07 +0100 Message-Id: <20230611140330.154222-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230611140330.154222-1-srinivas.kandagatla@linaro.org> References: <20230611140330.154222-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafał Miłecki Broadcom's NVRAM contains MACs for Ethernet interfaces. Those MACs are usually base addresses that are also used for calculating other MACs. For example if a router vendor decided to use gmac0 it most likely programmed NVRAM of each unit with a proper "et0macaddr" value. That is a base. Ethernet interface is usually connected to switch port. Switch usually includes few LAN ports and a WAN port. MAC of WAN port gets calculated as relative address to the interface one. Offset varies depending on device model. Wireless MACs may also need to be calculated using relevant offsets. To support all those scenarios let MAC NVMEM cells be referenced with an index specifying MAC offset. Disallow additionalProperties while at it. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla --- .../devicetree/bindings/nvmem/brcm,nvram.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml b/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml index 36def7128fca..13412af7f046 100644 --- a/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml +++ b/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml @@ -36,14 +36,29 @@ properties: et0macaddr: type: object description: First Ethernet interface's MAC address + properties: + "#nvmem-cell-cells": + description: The first argument is a MAC address offset. + const: 1 + additionalProperties: false et1macaddr: type: object description: Second Ethernet interface's MAC address + properties: + "#nvmem-cell-cells": + description: The first argument is a MAC address offset. + const: 1 + additionalProperties: false et2macaddr: type: object description: Third Ethernet interface's MAC address + properties: + "#nvmem-cell-cells": + description: The first argument is a MAC address offset. + const: 1 + additionalProperties: false unevaluatedProperties: false -- 2.25.1