From patchwork Fri Feb 11 13:05:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12743426 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF7F7C433EF for ; Fri, 11 Feb 2022 13:07:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Gk4OvC6KIm+QnUdBNjKhb97BOYmX7boA6sxwyR8LCpQ=; b=27kD53rHt6lIgK xCvTsDn0qboEake0rwlpc8RvQP4aXsMpG7sk8HpGTScmAsirvUwsqGDCHNNMztLJGVM/dpLkM2mzL 5WKoFi7Y8FyGWxP+5BTy7vKyYQ0i+o5cQJh5X8Q/saGvDBPlSh1wEfrLspqM0voP3aqAT9MYwXElL JCD9csv6tBSFPZXwLc4g1TUqbHEGT+mrBZUrhASfoU7n3Pl5LthqfWXbpAvFdy2jiEWe8Owl8CGEE jHAJcopJ+SYMEOx6JzUVddwm6HyeidvveRdrhArJhbkjrQT3ceZQ99Y+9tHHc8oNmlmgHHNkSZZCC SuJRMVXRXaNIoSCrCpLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIVd8-007JeU-Mt; Fri, 11 Feb 2022 13:06:30 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIVcq-007JXO-5B for linux-arm-kernel@lists.infradead.org; Fri, 11 Feb 2022 13:06:13 +0000 Received: by mail-lj1-x22e.google.com with SMTP id o9so7585451ljq.4 for ; Fri, 11 Feb 2022 05:06:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QOZGevQGicR/4MkXAylsEnnmSbv+cCBrPCN/jkqNkh8=; b=eCZCn1FmAZxUuMEtpttv+KsWo7SwhcG/TpxpuSl+CJ1TkCD9kX+4YuN033rLRqjVbB COEB6eYs5kPbYM+lvMrP+/NoUg2zAu+N/r0aso39xSo/JEahMvA2ccHLvib9uvBu5Svp C5n+Ehizm3QJg7NpbYZPLm2BofR8A6eibHw16MJ803VjBtyBlBD5gSzgk7dmCV+TrKY0 snent26UPAX2zdPuUtvehBjiJVWmRx7J6Pq8yO5aXCR6VEr+5ZnnB4JNx7GRjxo5/1LD G5QJfceGRpDWr87fSo8JSsRZiJBkG4A9f+pUXsb9QMqOl2yr3DZ3DRULi4aa+IHOQBlV OBow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QOZGevQGicR/4MkXAylsEnnmSbv+cCBrPCN/jkqNkh8=; b=kRGnlQ0egM55v8MLH0QRbC2NJKnKxpU1+mAjUsJbxkb0DimhoxK6xPzPJRfVx2TZo8 2and6zhvGweX8FkobaUV8hngxgD7VvCL4mEGDZBMWnx7U93xe1xSTrPm0JJr+eUg/S27 uXybzD19HT76+NIvsRoj6IJVCWTov7MN73yP9t92MnPcDlLwHgry03O1GECEcVDlj6pw C2UxLSio33wp0QrblQlg097NNtWs6M9ebw9GRQASzq7H/4gp8f/zMWHQvKOSiKBfuK5J U40NVbRyTt7Aj9ckFkaGt7LhLNSC0MhofHJmJpOInJ+iWSondTRv0SiCJJsYZOOjGHQI +QOQ== X-Gm-Message-State: AOAM531oxDj1YSFI/ivQEBnu4Wm30zSlrnSEODq1kBqu9BLjVMsT7+Z1 nsDZzU/F5IL3HpkDnVHXJzk= X-Google-Smtp-Source: ABdhPJzBevgFzgppACuqmRMqskbqEtIQ/liEcKObs5ceSG/hjKKZgV3iJ9hpb9+QiyO+mgjTxxCMwg== X-Received: by 2002:a2e:a786:: with SMTP id c6mr930312ljf.385.1644584770532; Fri, 11 Feb 2022 05:06:10 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id b13sm3111094lfv.175.2022.02.11.05.06.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Feb 2022 05:06:10 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Srinivas Kandagatla , Rob Herring Cc: Krzysztof Kozlowski , Florian Fainelli , Hauke Mehrtens , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH V2 2/3] dt-bindings: nvmem: brcm, nvram: add NVMEM cell to example Date: Fri, 11 Feb 2022 14:05:53 +0100 Message-Id: <20220211130554.13062-3-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220211130554.13062-1-zajec5@gmail.com> References: <20220124160300.25131-1-zajec5@gmail.com> <20220211130554.13062-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220211_050612_228888_642C3F16 X-CRM114-Status: GOOD ( 13.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki NVRAM doesn't have cells at hardcoded addresses. They are stored in internal struct (custom & dynamic format) . It's still important to define relevant cells in DT so NVMEM consumers can reference them. One of cells set in almost every device is "et0macaddr" containing MAC address. Add it to example to show how it can be referenced. Signed-off-by: Rafał Miłecki --- V2: Add children nodes description per Rob's request --- .../devicetree/bindings/nvmem/brcm,nvram.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml b/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml index 8c3f0cd22821..fc1df9d1c4d4 100644 --- a/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml +++ b/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml @@ -27,11 +27,23 @@ properties: reg: maxItems: 1 +patternProperties: + ".*": + description: | + Each child node represents one NVRAM entry (variable). Node name has to + match variable name as internally defined in the NVRAM. + + Some of common NVRAM variables are: "board_id", "boardflags", "boot_wait", + "clkfreq", "et0macaddr", "sdram_config", "wait_time". + unevaluatedProperties: false examples: - | nvram@1eff0000 { - compatible = "brcm,nvram"; - reg = <0x1eff0000 0x10000>; + compatible = "brcm,nvram"; + reg = <0x1eff0000 0x10000>; + + mac: et0macaddr { + }; };