diff mbox series

[1/2] dt-bindings: nvmem: Add apple,efuses

Message ID 20220227115743.69059-1-sven@svenpeter.dev (mailing list archive)
State New, archived
Headers show
Series [1/2] dt-bindings: nvmem: Add apple,efuses | expand

Commit Message

Sven Peter Feb. 27, 2022, 11:57 a.m. UTC
Apple SoCs come with eFuses used to store factory-programmed data
such as calibration settings for the PCIe and Type-C PHY.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
---
 .../bindings/nvmem/apple,efuses.yaml          | 50 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 51 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/apple,efuses.yaml

Comments

Krzysztof Kozlowski March 3, 2022, 6 p.m. UTC | #1
On 27/02/2022 12:57, Sven Peter wrote:
> Apple SoCs come with eFuses used to store factory-programmed data
> such as calibration settings for the PCIe and Type-C PHY.
> 
> Signed-off-by: Sven Peter <sven@svenpeter.dev>
> ---
>  .../bindings/nvmem/apple,efuses.yaml          | 50 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 51 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
> 
> diff --git a/Documentation/devicetree/bindings/nvmem/apple,efuses.yaml b/Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
> new file mode 100644
> index 000000000000..a735d54856ae
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/nvmem/apple,efuses.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Apple SoC eFuse-based NVMEM
> +
> +description: |
> +  Apple SoCs such as the M1 contain factory-programmed eFuses used to e.g. store
> +  calibration data for the PCIe and the Type-C PHY or unique chip identifiers such
> +  as the ECID.
> +
> +maintainers:
> +  - Sven Peter <sven@svenpeter.dev>
> +
> +allOf:
> +  - $ref: "nvmem.yaml#"
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - apple,t8103-efuses
> +          - apple,t6000-efuses
> +      - const: apple,efuses
> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    efuse@3d2bc000 {
> +        compatible = "apple,t8103-efuses", "apple,efuses";
> +        reg = <0x3d2bc000 0x1000>;
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +
> +        ecid: efuse@500 {
> +              reg = <0x500 0x8>;

Mismatched indentation. Rest looks good.

Best regards,
Krzysztof
Sven Peter March 5, 2022, noon UTC | #2
On Thu, Mar 3, 2022, at 19:00, Krzysztof Kozlowski wrote:
> On 27/02/2022 12:57, Sven Peter wrote:
>> Apple SoCs come with eFuses used to store factory-programmed data
>> such as calibration settings for the PCIe and Type-C PHY.
>> 
>> Signed-off-by: Sven Peter <sven@svenpeter.dev>
>> ---
>>  .../bindings/nvmem/apple,efuses.yaml          | 50 +++++++++++++++++++
>>  MAINTAINERS                                   |  1 +
>>  2 files changed, 51 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
>> 
>> diff --git a/Documentation/devicetree/bindings/nvmem/apple,efuses.yaml b/Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
>> new file mode 100644
>> index 000000000000..a735d54856ae
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
>> @@ -0,0 +1,50 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/nvmem/apple,efuses.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Apple SoC eFuse-based NVMEM
>> +
>> +description: |
>> +  Apple SoCs such as the M1 contain factory-programmed eFuses used to e.g. store
>> +  calibration data for the PCIe and the Type-C PHY or unique chip identifiers such
>> +  as the ECID.
>> +
>> +maintainers:
>> +  - Sven Peter <sven@svenpeter.dev>
>> +
>> +allOf:
>> +  - $ref: "nvmem.yaml#"
>> +
>> +properties:
>> +  compatible:
>> +    items:
>> +      - enum:
>> +          - apple,t8103-efuses
>> +          - apple,t6000-efuses
>> +      - const: apple,efuses
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    efuse@3d2bc000 {
>> +        compatible = "apple,t8103-efuses", "apple,efuses";
>> +        reg = <0x3d2bc000 0x1000>;
>> +        #address-cells = <1>;
>> +        #size-cells = <1>;
>> +
>> +        ecid: efuse@500 {
>> +              reg = <0x500 0x8>;
>
> Mismatched indentation. Rest looks good.

Good catch, thanks! Will fix it for v2.


Best,


Sven
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/nvmem/apple,efuses.yaml b/Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
new file mode 100644
index 000000000000..a735d54856ae
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
@@ -0,0 +1,50 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/apple,efuses.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Apple SoC eFuse-based NVMEM
+
+description: |
+  Apple SoCs such as the M1 contain factory-programmed eFuses used to e.g. store
+  calibration data for the PCIe and the Type-C PHY or unique chip identifiers such
+  as the ECID.
+
+maintainers:
+  - Sven Peter <sven@svenpeter.dev>
+
+allOf:
+  - $ref: "nvmem.yaml#"
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - apple,t8103-efuses
+          - apple,t6000-efuses
+      - const: apple,efuses
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    efuse@3d2bc000 {
+        compatible = "apple,t8103-efuses", "apple,efuses";
+        reg = <0x3d2bc000 0x1000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        ecid: efuse@500 {
+              reg = <0x500 0x8>;
+        };
+    };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 2524b75763cd..1bc57af09c80 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1771,6 +1771,7 @@  F:	Documentation/devicetree/bindings/arm/apple/*
 F:	Documentation/devicetree/bindings/i2c/apple,i2c.yaml
 F:	Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
 F:	Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
+F:	Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
 F:	Documentation/devicetree/bindings/pci/apple,pcie.yaml
 F:	Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
 F:	Documentation/devicetree/bindings/power/apple*