Skip to contentSkip to conversation

Enable Security ID for H616

PATCH Superseded Martin Botka 4 participants 8 messages Aug 14, 2023

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Enable Security ID for H616

Hello,

This patch series enables Security ID (SID) support for AllWinner H616.

SID support is an requirement for few things:
- Thermal sensors
- CPU Binning ID (cpufreq will use this)
- EPhy

This patch series doesn't add support for the consumers. Those will come in the future via their own series.

Cheers,
Martin

---
Changes in v2:
- Drop driver changes
- Use fallback compatible in DT
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Martin Botka (2):
dt-bindings: nvmem: SID: Add binding for H616 SID controller
arm64: dts: allwinner: h616: Add SID controller node

 .../devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml         | 1 +
 arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi                     | 7 +++++++
 2 files changed, 8 insertions(+)

---
base-commit: 52a93d39b17dc7eb98b6aa3edb93943248e03b2f
change-id: 20230811-sid-h616-37b773e59571

Best regards,

Signature · 1 line
Martin Botka <[email protected]>
#1 lore raw

PATCH v2 1/2 dt-bindings: nvmem: SID: Add binding for H616 SID controller

Add binding for the SID controller found in H616 SoC

---
 Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml +1 -0
index 296001e7f498..2ec0a1b8f803 100644
@@ -27,6 +27,7 @@ properties:
           - const: allwinner,sun50i-a64-sid
       - const: allwinner,sun50i-h5-sid
       - const: allwinner,sun50i-h6-sid
+      - const: allwinner,sun50i-h616-sid
 
   reg:
     maxItems: 1
Signature · 1 line
2.41.0
#2 lore raw

Re: [PATCH v2 1/2] dt-bindings: nvmem: SID: Add binding for H616 SID controller

Quoted 12 lines · Martin Botka

Add binding for the SID controller found in H616 SoC

---
 Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml +0 -0
index 296001e7f498..2ec0a1b8f803 100644

Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml properties: · line 30

Quoted 4 lines
Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml +1 -0
@@ -27,6 +27,7 @@ properties:
           - const: allwinner,sun50i-a64-sid
       - const: allwinner,sun50i-h5-sid
       - const: allwinner,sun50i-h6-sid
+      - const: allwinner,sun50i-h616-sid

It does not look like you tested the DTS against bindings. Please run make dtbs_check (see Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH v2 1/2] dt-bindings: nvmem: SID: Add binding for H616 SID controller

Quoted 22 lines · Krzysztof Kozlowski
Quoted 8 lines · Martin Botka

Add binding for the SID controller found in H616 SoC

---

Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml | 1 +

  1 file changed, 1 insertion(+)
Quoted 12 lines

diff --git
a/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml b/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml
index 296001e7f498..2ec0a1b8f803 100644
---
a/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml
+++
b/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml
@@ -27,6 +27,7 @@ properties:
- const: allwinner,sun50i-a64-sid
- const: allwinner,sun50i-h5-sid
- const: allwinner,sun50i-h6-sid
+ - const: allwinner,sun50i-h616-sid

Quoted 9 lines

It does not look like you tested the DTS against bindings. Please run make dtbs_check (see Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).

Best regards,
Krzysztof

Yea completely forgot. Sorry for that.

Will send v3 tomorrow with proper binding patch using items with enums

maintainer
#4 lore raw

Re: [PATCH v2 1/2] dt-bindings: nvmem: SID: Add binding for H616 SID controller

Dne ponedeljek, 14. avgust 2023 ob 10:21:49 CEST je Martin Botka napisal(a):

Quoted 43 lines

On Mon, Aug 14 2023 at 10:08:38 AM +02:00:00, Krzysztof Kozlowski

Quoted 40 lines · <[email protected]> wrote:
Quoted 25 lines · Martin Botka

Add binding for the SID controller found in H616 SoC

---

Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml

| 1 +
|

  1 file changed, 1 insertion(+)

diff --git

a/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml b/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml

index 296001e7f498..2ec0a1b8f803 100644
---

a/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml

+++

b/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml

Quoted 7 lines

@@ -27,6 +27,7 @@ properties:
- const: allwinner,sun50i-a64-sid

- const: allwinner,sun50i-h5-sid
- const: allwinner,sun50i-h6-sid

+ - const: allwinner,sun50i-h616-sid

It does not look like you tested the DTS against bindings. Please run make dtbs_check (see Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sour
ces-with-the-devicetree-schema/ for instructions).

Quoted 6 lines
Quoted 2 lines

Best regards,
Krzysztof

Yea completely forgot. Sorry for that.

Will send v3 tomorrow with proper binding patch using items with enums

Don't. You have cca. 1 month time now, since you missed at least window for DT changes for 6.6.

Best regards,
Jernej

#5 lore raw

Re: [PATCH v2 1/2] dt-bindings: nvmem: SID: Add binding for H616 SID controller

Quoted 47 lines · On Mon, 14 Aug 2023 12:28:36 +0200 Jernej Škrabec <[email protected]>…

Dne ponedeljek, 14. avgust 2023 ob 10:21:49 CEST je Martin Botka napisal(a):

Quoted 46 lines

On Mon, Aug 14 2023 at 10:08:38 AM +02:00:00, Krzysztof Kozlowski

Quoted 42 lines · <[email protected]> wrote:
Quoted 25 lines · Martin Botka

Add binding for the SID controller found in H616 SoC

---

Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml

| 1 +
|

  1 file changed, 1 insertion(+)

diff --git

a/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml b/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml

index 296001e7f498..2ec0a1b8f803 100644
---

a/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml

+++

b/Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml

Quoted 7 lines

@@ -27,6 +27,7 @@ properties:
- const: allwinner,sun50i-a64-sid

- const: allwinner,sun50i-h5-sid
- const: allwinner,sun50i-h6-sid

+ - const: allwinner,sun50i-h616-sid

It does not look like you tested the DTS against bindings. Please run make dtbs_check (see Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sour
ces-with-the-devicetree-schema/ for instructions).

Best regards,
Krzysztof

Quoted 6 lines
Quoted 3 lines

Yea completely forgot. Sorry for that.

Will send v3 tomorrow with proper binding patch using items with enums

Don't. You have cca. 1 month time now, since you missed at least window for DT changes for 6.6.

Plus we need to figure out if my comment about using a fallback compatible was actually correct, as asked here:
https://lore.kernel.org/linux-arm-kernel/[email protected]/

Cheers,
Andre

#6 lore raw

PATCH v2 2/2 arm64: dts: allwinner: h616: Add SID controller node

In reply to Martin Botka

Add node for the H616 SID controller

---
 arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi +7 -0
index 74aed0d232a9..d549d277d972 100644
@@ -133,6 +133,13 @@ ccu: clock@3001000 {
 			#reset-cells = <1>;
 		};
 
+		sid: efuse@3006000 {
+			compatible = "allwinner,sun50i-h616-sid", "allwinner,sun50i-a64-sid";
+			reg = <0x03006000 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
+
 		watchdog: watchdog@30090a0 {
 			compatible = "allwinner,sun50i-h616-wdt",
 				     "allwinner,sun6i-a31-wdt";
Signature · 1 line
2.41.0
#7 lore raw

Re: [PATCH v2 2/2] arm64: dts: allwinner: h616: Add SID controller node

Quoted 12 lines · Martin Botka

Add node for the H616 SID controller

---
 arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi +0 -0
index 74aed0d232a9..d549d277d972 100644

arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi ccu: clock@3001000 { · line 137

Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi +2 -0
@@ -133,6 +133,13 @@ ccu: clock@3001000 {
 			#reset-cells = <1>;
 		};
 
+		sid: efuse@3006000 {
+			compatible = "allwinner,sun50i-h616-sid", "allwinner,sun50i-a64-sid";

Are you sure? Limited diff context from your patch #1 suggests something else.

Best regards,
Krzysztof