From nobody Sun Feb 8 00:38:57 2026 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CCBB53389; Sat, 13 Jul 2024 12:12:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720872779; cv=none; b=nBTH9XseuRylB7tWQnwTRbQlf2ZPOh31yeD7vdowdMdVMn93WzINGEZR9WkmvN209vxeJbwsJIAOubcqGw0SlhgNXEg1mnCjQjCmIK6kAcLpyQTHud4byV0ewVuK0/xnzSek7ihq+1axazcD0CECauCuGbSidvLRaq0StXp50r8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720872779; c=relaxed/simple; bh=hHfwLIJ0FH+SbJdaPZgAvy7dYEUtEaKCpGLPLUOuUok=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=E/tnDW/Qveo0G1tktlbiCpycjSOBFjI1/ogRVWulGFW1xmHk4h483WJc7Ou57gqmfxPuUTINNdMNn8AEFEgsUkDWoS6GSlb5IE7JknbKeJP76T2wyFdFmtzXDdUqdoqCXEZcI2tCTnoiaTeskB77FlraKQfxYYYbcTG5TCH3tHw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iqB1qdRR; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iqB1qdRR" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-367a3d1a378so2420962f8f.1; Sat, 13 Jul 2024 05:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720872776; x=1721477576; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=ufVYtDc7G7PuycxxzlcwPvFM8/Ac5PF0pinaAK0zLlw=; b=iqB1qdRRXIEHb+GwAtcKFnEYGMz33be03pKQkPcN3gT3lOeJ38TtOuPiniTwh/zGQz bU2vak/CRr8Jh+HiHA7C/6Ac26hYScPDGK+C0z9mE9R4w1ZgvTeIh1dmKspKzyBCTatz 29Ib5LB4L7zioGOCt6d7xjGpUjp2avRhgEaJ0FcjwCryK/PypkjcMb8LtYjuTZvLFqqL SFpPW+cuVAeBxBRxYVvHMrwIZYpx8NmxqamWUxQA650WP/F4YibqScS3FIHIv5c+afqa ve0m50z+u1mkicViZ5POUrKd9yoCzynBSA217yEXcwPRQSW1AYNUuMIaTycRGqudU/uX TZQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720872776; x=1721477576; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ufVYtDc7G7PuycxxzlcwPvFM8/Ac5PF0pinaAK0zLlw=; b=b6at0qidrlcTs0K60ay3uIWt94TWW4rdw51xsCdFyaGDGticrxHl8iyb5oph5lRFXM khwI1D/R/ZUMPJNxbqmGJlYoO4ciYceCUXjzLDcp/geDgcW7JU6Or1APn2KTZHCyvEiB aINzD80+fKQI5LUb5NSL9IplJIeQOglVkKjG9jwACXGfLC/nhcI759pwK0m9cQOMpTcr 5AfKYoywOy4RsUHLnNW1OG/EpME+0/FG33GKL6OmhReRY0vlhMuEbKYQ2pj1XV91PJRQ f4NoTeE3RJVEBVEewIFb1iuuXYMHVnFEoVyhgwEiCpyKs77X9kJayJj6lQPcyXn9aUTC GUWA== X-Forwarded-Encrypted: i=1; AJvYcCVzfunDVeP6Su/l0OJv0YxnKS+tAavaSxKepne3oeoF68t4iPn328EiznEx99sZyNXmaowIV8yE8wg3YiYSdVKoZTHqJjGSYAnSNzyr X-Gm-Message-State: AOJu0YxuOVUXyi38/Owq5EqC1E6x26ubVa/OQ4a6UTHv7w4N+g4UMej0 7YdS/qeIUPyPGlm/7hpM29Cbsba4TE3SgIQxulpIT2N3MyLNnKVb X-Google-Smtp-Source: AGHT+IFAfvrMYHgTFmGI9NjEPMRXhsDXySxFbpwVSMR3d2UTjfV674MzhTHpyTL+TWlsxkaXpHyu3w== X-Received: by 2002:a5d:47c3:0:b0:368:5be:2bf9 with SMTP id ffacd0b85a97d-36805be2c4dmr4458696f8f.24.1720872775373; Sat, 13 Jul 2024 05:12:55 -0700 (PDT) Received: from standask-GA-A55M-S2HP (lu-nat-113-247.ehs.sk. [188.123.113.247]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f25babbsm52609325e9.20.2024.07.13.05.12.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jul 2024 05:12:55 -0700 (PDT) Date: Sat, 13 Jul 2024 14:12:53 +0200 From: Stanislav Jakubek To: Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Orson Zhai , Baolin Wang , Baolin Wang , Chunyan Zhang Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: nvmem: sprd-efuse: convert to YAML Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert the Spreadtrum eFuse bindings to DT schema. Since they are very similar, both of the existing Spreadtrum txt bindings were merged into one common binding document, named after the only in-tree user, SC2731. Signed-off-by: Stanislav Jakubek --- .../bindings/nvmem/sc27xx-efuse.txt | 52 ----------- .../bindings/nvmem/sprd,sc2731-efuse.yaml | 88 +++++++++++++++++++ .../devicetree/bindings/nvmem/sprd-efuse.txt | 39 -------- 3 files changed, 88 insertions(+), 91 deletions(-) delete mode 100644 Documentation/devicetree/bindings/nvmem/sc27xx-efuse.txt create mode 100644 Documentation/devicetree/bindings/nvmem/sprd,sc2731-efu= se.yaml delete mode 100644 Documentation/devicetree/bindings/nvmem/sprd-efuse.txt diff --git a/Documentation/devicetree/bindings/nvmem/sc27xx-efuse.txt b/Doc= umentation/devicetree/bindings/nvmem/sc27xx-efuse.txt deleted file mode 100644 index 586c08286aa9..000000000000 --- a/Documentation/devicetree/bindings/nvmem/sc27xx-efuse.txt +++ /dev/null @@ -1,52 +0,0 @@ -=3D Spreadtrum SC27XX PMIC eFuse device tree bindings =3D - -Required properties: -- compatible: Should be one of the following. - "sprd,sc2720-efuse" - "sprd,sc2721-efuse" - "sprd,sc2723-efuse" - "sprd,sc2730-efuse" - "sprd,sc2731-efuse" -- reg: Specify the address offset of efuse controller. -- hwlocks: Reference to a phandle of a hwlock provider node. - -=3D Data cells =3D -Are child nodes of eFuse, bindings of which as described in -bindings/nvmem/nvmem.txt - -Example: - - sc2731_pmic: pmic@0 { - compatible =3D "sprd,sc2731"; - reg =3D <0>; - spi-max-frequency =3D <26000000>; - interrupts =3D ; - interrupt-controller; - #interrupt-cells =3D <2>; - #address-cells =3D <1>; - #size-cells =3D <0>; - - efuse@380 { - compatible =3D "sprd,sc2731-efuse"; - reg =3D <0x380>; - #address-cells =3D <1>; - #size-cells =3D <1>; - hwlocks =3D <&hwlock 12>; - - /* Data cells */ - thermal_calib: calib@10 { - reg =3D <0x10 0x2>; - }; - }; - }; - -=3D Data consumers =3D -Are device nodes which consume nvmem data cells. - -Example: - - thermal { - ... - nvmem-cells =3D <&thermal_calib>; - nvmem-cell-names =3D "calibration"; - }; diff --git a/Documentation/devicetree/bindings/nvmem/sprd,sc2731-efuse.yaml= b/Documentation/devicetree/bindings/nvmem/sprd,sc2731-efuse.yaml new file mode 100644 index 000000000000..98d1400991d7 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/sprd,sc2731-efuse.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/sprd,sc2731-efuse.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Spreadtrum eFuse + +maintainers: + - Orson Zhai + - Baolin Wang + - Chunyan Zhang + +properties: + compatible: + enum: + - sprd,sc2720-efuse + - sprd,sc2721-efuse + - sprd,sc2723-efuse + - sprd,sc2730-efuse + - sprd,sc2731-efuse + - sprd,ums312-efuse + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: enable + + hwlocks: + maxItems: 1 + +required: + - compatible + - reg + - hwlocks + +allOf: + - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# + - if: + properties: + compatible: + contains: + const: sprd,ums312-efuse + then: + required: + - clocks + - clock-names + else: + properties: + clocks: false + clock-names: false + +unevaluatedProperties: false + +examples: + - | + pmic { + #address-cells =3D <1>; + #size-cells =3D <0>; + + efuse@380 { + compatible =3D "sprd,sc2731-efuse"; + reg =3D <0x380>; + hwlocks =3D <&hwlock 12>; + #address-cells =3D <1>; + #size-cells =3D <1>; + + /* Data cells */ + fgu_calib: calib@6 { + reg =3D <0x6 0x2>; + bits =3D <0 9>; + }; + + adc_big_scale: calib@24 { + reg =3D <0x24 0x2>; + }; + + adc_small_scale: calib@26 { + reg =3D <0x26 0x2>; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/nvmem/sprd-efuse.txt b/Docum= entation/devicetree/bindings/nvmem/sprd-efuse.txt deleted file mode 100644 index 96b6feec27f0..000000000000 --- a/Documentation/devicetree/bindings/nvmem/sprd-efuse.txt +++ /dev/null @@ -1,39 +0,0 @@ -=3D Spreadtrum eFuse device tree bindings =3D - -Required properties: -- compatible: Should be "sprd,ums312-efuse". -- reg: Specify the address offset of efuse controller. -- clock-names: Should be "enable". -- clocks: The phandle and specifier referencing the controller's clock. -- hwlocks: Reference to a phandle of a hwlock provider node. - -=3D Data cells =3D -Are child nodes of eFuse, bindings of which as described in -bindings/nvmem/nvmem.txt - -Example: - - ap_efuse: efuse@32240000 { - compatible =3D "sprd,ums312-efuse"; - reg =3D <0 0x32240000 0 0x10000>; - clock-names =3D "enable"; - hwlocks =3D <&hwlock 8>; - clocks =3D <&aonapb_gate CLK_EFUSE_EB>; - - /* Data cells */ - thermal_calib: calib@10 { - reg =3D <0x10 0x2>; - }; - }; - -=3D Data consumers =3D -Are device nodes which consume nvmem data cells. - -Example: - - thermal { - ... - - nvmem-cells =3D <&thermal_calib>; - nvmem-cell-names =3D "calibration"; - }; --=20 2.34.1