From patchwork Sun Jun 11 14:03:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 106100 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2078722vqr; Sun, 11 Jun 2023 08:01:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7mvT7odC1paWZrN6YPGZtqzxo0+4DJMIzIPV1YCA/KDZUyv0Anhtu70C8q02NeIYBBaqpQ X-Received: by 2002:a17:906:dac7:b0:94a:56ec:7f12 with SMTP id xi7-20020a170906dac700b0094a56ec7f12mr7109292ejb.30.1686495694492; Sun, 11 Jun 2023 08:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686495694; cv=none; d=google.com; s=arc-20160816; b=a7U1SzYYOPv1a+35xdHY2hgOHuQEaiimGrZJQ5Vh60hBeD6yQjwaFLTyYVigtYQSfx k8NiG6f2eot2V3DiomUfrv+YdXf4V7lbI+qjfRq/QIZaWyGrZ2MHtJbmminaYeMR41Uh Cn0jXlgVVRCTRM13MBfowxJFaKWoykWPVJkXXqd4ThrvML1DhbLlVaDC4KDERqiU59cP EeQe7hc2JLs9OjKUJ7PhiPjWbNHYy0NhS5Im3ITyY+yju0MRRCNX4nF7vanj1DtnRbmZ DWQ5HyrbGDJGklk2xW2oqXfSuXF/eVDPQcgZN32211Jkszji21omO5VBl52hZGuq9N6u 39IQ== 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=ffPBlAj1+1XHbbG8ux/mThYwqkSCxXqYmL1NmIDot1g=; b=dTLQzZgTzIU0wXSB6nFdvcCzWCh5+fWG8Nn21gorN+Tps5XVHxEbM87fcDXjU2qt5E ez9ytIyneJfftN76JkMQPGaYLtH8gTy56z2Ng8VCjc/3vIN5VpoUdP4c7qyMMr4HX4FA IumeZcZsV20iZLViMxAOppdewHlown/ayry/c1i3DckIrAk+cDOVNksn0C+kGJHlHBns Gnp/BqfYYdiL3glMp6rSgtEeo5pE40HJSJCkTsU3xeR0njpSZnyF4q4xDDaa7VBYhe1o KScPrS8DENaJQ842rMOa1ux8N0Gr6Zynmqnvjo0BN/clWIMSuqCyLVqb8AJMjpr8VkPo kSFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j+NCiXNl; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g17-20020a1709061c9100b00977c89c2c35si4196557ejh.697.2023.06.11.08.01.09; Sun, 11 Jun 2023 08:01:34 -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=j+NCiXNl; 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 S233868AbjFKOEM (ORCPT + 99 others); Sun, 11 Jun 2023 10:04:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233701AbjFKOD4 (ORCPT ); Sun, 11 Jun 2023 10:03:56 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C17B10CF for ; Sun, 11 Jun 2023 07:03:54 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3f7f4819256so24999895e9.1 for ; Sun, 11 Jun 2023 07:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686492232; x=1689084232; 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=ffPBlAj1+1XHbbG8ux/mThYwqkSCxXqYmL1NmIDot1g=; b=j+NCiXNleciI9NeL2kkyGHDX1HndsDa+Pengp6as+6HIpyDXins5MfKcBngJNdUWDK JR6I+QYNr/AqJZ7ly3fSUcAeti65KI2ErVtVoaUtqvXRZ5HKr71/5W9BifG/65Zvq9Ua mvburv30OhBirqC8I14PYF0ZPWxxsKULIaiErrvjY1zG6B47aFmFvVgF2KTTA+s0hMS1 CsQRgO4Cq1pEN5BPMjQG9/rjTL0o5aYhEBkiGCPMY+1WOP4KuumrdDq7U7nljbZDz0PH TlEZs0EE/W7aaw+2TBUURdWUewaH9DgTuXG626rFR/bjor7Cx7h8vPuYPE+gsKhjMa7K O+hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686492232; x=1689084232; 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=ffPBlAj1+1XHbbG8ux/mThYwqkSCxXqYmL1NmIDot1g=; b=h+UNsl2l2qesKFpaPs6JVti0BoxvenWzzdgXLtefod3Msv+TxiCpC7xxcoIAKGBynq AwYY1P2h7IygRUSSD4rMi8kNgUsBa55zs53XCnmiC/+HexGlDbaSJDqFcI9SdHuWoL8b 8EiTgOZegx2PDERIfalSEekGt0EypkPXQqyV+zVUhJE1XMEJtiTMD18lhAl9NDDFbKKk IlmUXOmJFmKTAb61XePG9DM9ujXitEAQqs9sX4Gngnxmj9f6z8iTpl6Qa5cWB3swewPc R3CCpedDxHFcJpQsJAWAEfyQZliFzTtCRA02QCd/KhH8MqL+ap0MT7KojY82AQoH1Xze EzAw== X-Gm-Message-State: AC+VfDzITCgGrY0eHYlt0Fwo/gObIx6JtORfelZp7l26AlE8g6nrfY1K EQLhNzi7A41m14elrh2blLBPXQ== X-Received: by 2002:a05:600c:2190:b0:3f7:395a:c9fa with SMTP id e16-20020a05600c219000b003f7395ac9famr5198158wme.4.1686492232538; Sun, 11 Jun 2023 07:03:52 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Jun 2023 07:03:51 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Cristian Ciocaltea , Heiko Stuebner , Krzysztof Kozlowski , Srinivas Kandagatla Subject: [PATCH 07/26] dt-bindings: nvmem: Convert rockchip-otp.txt to dt-schema Date: Sun, 11 Jun 2023 15:03:11 +0100 Message-Id: <20230611140330.154222-8-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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768418909563759500?= X-GMAIL-MSGID: =?utf-8?q?1768418909563759500?= From: Cristian Ciocaltea Convert the Rockchip OTP memory bindings to dt-schema. Signed-off-by: Cristian Ciocaltea Reviewed-by: Heiko Stuebner Reviewed-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla --- .../bindings/nvmem/rockchip,otp.yaml | 82 +++++++++++++++++++ .../bindings/nvmem/rockchip-otp.txt | 25 ------ 2 files changed, 82 insertions(+), 25 deletions(-) create mode 100644 Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml delete mode 100644 Documentation/devicetree/bindings/nvmem/rockchip-otp.txt diff --git a/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml b/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml new file mode 100644 index 000000000000..4cd425ae2823 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/rockchip,otp.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip internal OTP (One Time Programmable) memory + +maintainers: + - Heiko Stuebner + +allOf: + - $ref: nvmem.yaml# + +properties: + compatible: + enum: + - rockchip,px30-otp + - rockchip,rk3308-otp + + reg: + maxItems: 1 + + clocks: + maxItems: 3 + + clock-names: + items: + - const: otp + - const: apb_pclk + - const: phy + + resets: + maxItems: 1 + + reset-names: + items: + - const: phy + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - reset-names + +unevaluatedProperties: false + +examples: + - | + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + otp: efuse@ff290000 { + compatible = "rockchip,px30-otp"; + reg = <0x0 0xff290000 0x0 0x4000>; + clocks = <&cru SCLK_OTP_USR>, <&cru PCLK_OTP_NS>, + <&cru PCLK_OTP_PHY>; + clock-names = "otp", "apb_pclk", "phy"; + resets = <&cru SRST_OTP_PHY>; + reset-names = "phy"; + #address-cells = <1>; + #size-cells = <1>; + + cpu_id: id@7 { + reg = <0x07 0x10>; + }; + + cpu_leakage: cpu-leakage@17 { + reg = <0x17 0x1>; + }; + + performance: performance@1e { + reg = <0x1e 0x1>; + bits = <4 3>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/nvmem/rockchip-otp.txt b/Documentation/devicetree/bindings/nvmem/rockchip-otp.txt deleted file mode 100644 index 40f649f7c2e5..000000000000 --- a/Documentation/devicetree/bindings/nvmem/rockchip-otp.txt +++ /dev/null @@ -1,25 +0,0 @@ -Rockchip internal OTP (One Time Programmable) memory device tree bindings - -Required properties: -- compatible: Should be one of the following. - - "rockchip,px30-otp" - for PX30 SoCs. - - "rockchip,rk3308-otp" - for RK3308 SoCs. -- reg: Should contain the registers location and size -- clocks: Must contain an entry for each entry in clock-names. -- clock-names: Should be "otp", "apb_pclk" and "phy". -- resets: Must contain an entry for each entry in reset-names. - See ../../reset/reset.txt for details. -- reset-names: Should be "phy". - -See nvmem.txt for more information. - -Example: - otp: otp@ff290000 { - compatible = "rockchip,px30-otp"; - reg = <0x0 0xff290000 0x0 0x4000>; - #address-cells = <1>; - #size-cells = <1>; - clocks = <&cru SCLK_OTP_USR>, <&cru PCLK_OTP_NS>, - <&cru PCLK_OTP_PHY>; - clock-names = "otp", "apb_pclk", "phy"; - };