All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
@ 2022-07-06 19:08 ` Andrew Davis
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-07-06 19:08 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel
  Cc: Andrew Davis

The hardware random number generator is used by OP-TEE and is access is
denied to other users with SoC level bus firewalls. Any access to this
device from Linux will result in firewall errors. Disable this node.

Signed-off-by: Andrew Davis <afd@ti.com>
---

Changes from v1:
 - Added comment in dtsi file

 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index e749343accedd..9de5a8294acd6 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -127,6 +127,7 @@ rng: rng@4e10000 {
 			reg = <0x0 0x4e10000 0x0 0x7d>;
 			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&k3_clks 136 1>;
+			status = "disabled"; /* Used by OP-TEE */
 		};
 	};
 
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
@ 2022-07-06 19:08 ` Andrew Davis
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-07-06 19:08 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel
  Cc: Andrew Davis

The hardware random number generator is used by OP-TEE and is access is
denied to other users with SoC level bus firewalls. Any access to this
device from Linux will result in firewall errors. Disable this node.

Signed-off-by: Andrew Davis <afd@ti.com>
---

Changes from v1:
 - Added comment in dtsi file

 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index e749343accedd..9de5a8294acd6 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -127,6 +127,7 @@ rng: rng@4e10000 {
 			reg = <0x0 0x4e10000 0x0 0x7d>;
 			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&k3_clks 136 1>;
+			status = "disabled"; /* Used by OP-TEE */
 		};
 	};
 
-- 
2.36.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 2/4] arm64: dts: ti: k3-am65-main: Move SA2UL to unused PSI-L thread ID
  2022-07-06 19:08 ` Andrew Davis
@ 2022-07-06 19:08   ` Andrew Davis
  -1 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-07-06 19:08 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel
  Cc: Andrew Davis

The first TX and first two RX PSI-L threads for SA2UL are used
by SYSFW on High Security(HS) devices. Use the next available
threads to prevent resource allocation conflicts.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index 9de5a8294acd6..ff86c0181a68b 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -117,8 +117,8 @@ crypto: crypto@4e00000 {
 		#size-cells = <2>;
 		ranges = <0x0 0x04e00000 0x00 0x04e00000 0x0 0x30000>;
 
-		dmas = <&main_udmap 0xc000>, <&main_udmap 0x4000>,
-				<&main_udmap 0x4001>;
+		dmas = <&main_udmap 0xc001>, <&main_udmap 0x4002>,
+				<&main_udmap 0x4003>;
 		dma-names = "tx", "rx1", "rx2";
 		dma-coherent;
 
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 2/4] arm64: dts: ti: k3-am65-main: Move SA2UL to unused PSI-L thread ID
@ 2022-07-06 19:08   ` Andrew Davis
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-07-06 19:08 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel
  Cc: Andrew Davis

The first TX and first two RX PSI-L threads for SA2UL are used
by SYSFW on High Security(HS) devices. Use the next available
threads to prevent resource allocation conflicts.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index 9de5a8294acd6..ff86c0181a68b 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -117,8 +117,8 @@ crypto: crypto@4e00000 {
 		#size-cells = <2>;
 		ranges = <0x0 0x04e00000 0x00 0x04e00000 0x0 0x30000>;
 
-		dmas = <&main_udmap 0xc000>, <&main_udmap 0x4000>,
-				<&main_udmap 0x4001>;
+		dmas = <&main_udmap 0xc001>, <&main_udmap 0x4002>,
+				<&main_udmap 0x4003>;
 		dma-names = "tx", "rx1", "rx2";
 		dma-coherent;
 
-- 
2.36.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 3/4] arm64: dts: ti: k3-am65-main: Do not exclusively claim SA2UL
  2022-07-06 19:08 ` Andrew Davis
@ 2022-07-06 19:08   ` Andrew Davis
  -1 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-07-06 19:08 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel
  Cc: Andrew Davis

The SA2UL hardware is also used by SYSFW and OP-TEE. It should be
requested using the shared TI-SCI flags instead of the exclusive
flags or the request will fail.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index ff86c0181a68b..47970086c1d63 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -112,7 +112,7 @@ main_uart2: serial@2820000 {
 	crypto: crypto@4e00000 {
 		compatible = "ti,am654-sa2ul";
 		reg = <0x0 0x4e00000 0x0 0x1200>;
-		power-domains = <&k3_pds 136 TI_SCI_PD_EXCLUSIVE>;
+		power-domains = <&k3_pds 136 TI_SCI_PD_SHARED>;
 		#address-cells = <2>;
 		#size-cells = <2>;
 		ranges = <0x0 0x04e00000 0x00 0x04e00000 0x0 0x30000>;
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 3/4] arm64: dts: ti: k3-am65-main: Do not exclusively claim SA2UL
@ 2022-07-06 19:08   ` Andrew Davis
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-07-06 19:08 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel
  Cc: Andrew Davis

The SA2UL hardware is also used by SYSFW and OP-TEE. It should be
requested using the shared TI-SCI flags instead of the exclusive
flags or the request will fail.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index ff86c0181a68b..47970086c1d63 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -112,7 +112,7 @@ main_uart2: serial@2820000 {
 	crypto: crypto@4e00000 {
 		compatible = "ti,am654-sa2ul";
 		reg = <0x0 0x4e00000 0x0 0x1200>;
-		power-domains = <&k3_pds 136 TI_SCI_PD_EXCLUSIVE>;
+		power-domains = <&k3_pds 136 TI_SCI_PD_SHARED>;
 		#address-cells = <2>;
 		#size-cells = <2>;
 		ranges = <0x0 0x04e00000 0x00 0x04e00000 0x0 0x30000>;
-- 
2.36.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 4/4] arm64: dts: ti: k3-j7200-mcu-wakeup: Add SA2UL node
  2022-07-06 19:08 ` Andrew Davis
@ 2022-07-06 19:08   ` Andrew Davis
  -1 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-07-06 19:08 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel
  Cc: Andrew Davis

J7200 has an instance of SA2UL in the MCU domain.
Add DT node for the same.

The device is marked TI_SCI_PD_SHARED as parts of this IP are also
shared with the security co-processor and OP-TEE.

The RNG node is added but marked disabled as it is firewalled off for
exclusive use by OP-TEE. Any access to this device from Linux will
result in firewall errors. We add the node for completeness of the
hardware description.

Signed-off-by: Andrew Davis <afd@ti.com>
---

Changes from v1:
 - Added comment in dtsi file
 - Added extra context to commit message

 .../boot/dts/ti/k3-j7200-mcu-wakeup.dtsi      | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi
index 1044ec6c4b0d4..a37280200c401 100644
--- a/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi
@@ -375,4 +375,24 @@ mcu_r5fss0_core1: r5f@41400000 {
 			ti,loczrama = <1>;
 		};
 	};
+
+	mcu_crypto: crypto@40900000 {
+		compatible = "ti,j721e-sa2ul";
+		reg = <0x00 0x40900000 0x00 0x1200>;
+		power-domains = <&k3_pds 265 TI_SCI_PD_SHARED>;
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges = <0x00 0x40900000 0x00 0x40900000 0x00 0x30000>;
+		dmas = <&mcu_udmap 0xf501>, <&mcu_udmap 0x7502>,
+		       <&mcu_udmap 0x7503>;
+		dma-names = "tx", "rx1", "rx2";
+		dma-coherent;
+
+		rng: rng@40910000 {
+			compatible = "inside-secure,safexcel-eip76";
+			reg = <0x00 0x40910000 0x00 0x7d>;
+			interrupts = <GIC_SPI 945 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled"; /* Used by OP-TEE */
+		};
+	};
 };
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 4/4] arm64: dts: ti: k3-j7200-mcu-wakeup: Add SA2UL node
@ 2022-07-06 19:08   ` Andrew Davis
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-07-06 19:08 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel
  Cc: Andrew Davis

J7200 has an instance of SA2UL in the MCU domain.
Add DT node for the same.

The device is marked TI_SCI_PD_SHARED as parts of this IP are also
shared with the security co-processor and OP-TEE.

The RNG node is added but marked disabled as it is firewalled off for
exclusive use by OP-TEE. Any access to this device from Linux will
result in firewall errors. We add the node for completeness of the
hardware description.

Signed-off-by: Andrew Davis <afd@ti.com>
---

Changes from v1:
 - Added comment in dtsi file
 - Added extra context to commit message

 .../boot/dts/ti/k3-j7200-mcu-wakeup.dtsi      | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi
index 1044ec6c4b0d4..a37280200c401 100644
--- a/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi
@@ -375,4 +375,24 @@ mcu_r5fss0_core1: r5f@41400000 {
 			ti,loczrama = <1>;
 		};
 	};
+
+	mcu_crypto: crypto@40900000 {
+		compatible = "ti,j721e-sa2ul";
+		reg = <0x00 0x40900000 0x00 0x1200>;
+		power-domains = <&k3_pds 265 TI_SCI_PD_SHARED>;
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges = <0x00 0x40900000 0x00 0x40900000 0x00 0x30000>;
+		dmas = <&mcu_udmap 0xf501>, <&mcu_udmap 0x7502>,
+		       <&mcu_udmap 0x7503>;
+		dma-names = "tx", "rx1", "rx2";
+		dma-coherent;
+
+		rng: rng@40910000 {
+			compatible = "inside-secure,safexcel-eip76";
+			reg = <0x00 0x40910000 0x00 0x7d>;
+			interrupts = <GIC_SPI 945 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled"; /* Used by OP-TEE */
+		};
+	};
 };
-- 
2.36.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
  2022-07-06 19:08 ` Andrew Davis
@ 2022-07-07 14:44   ` Bryan Brattlof
  -1 siblings, 0 replies; 24+ messages in thread
From: Bryan Brattlof @ 2022-07-07 14:44 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel

Hi Andrew

On July  6, 2022 thus sayeth Andrew Davis:
> The hardware random number generator is used by OP-TEE and is access is
> denied to other users with SoC level bus firewalls. Any access to this
> device from Linux will result in firewall errors. Disable this node.
> 
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
> 
> Changes from v1:
>  - Added comment in dtsi file
> 
>  arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> index e749343accedd..9de5a8294acd6 100644
> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> @@ -127,6 +127,7 @@ rng: rng@4e10000 {
>  			reg = <0x0 0x4e10000 0x0 0x7d>;
>  			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>  			clocks = <&k3_clks 136 1>;
> +			status = "disabled"; /* Used by OP-TEE */

Just curious about how we should document disabling nodes. I was 
assuming the reasoning should be described in the bindings?

I would like to start disabling nodes by default in our dtsi files and 
enabling them in our top dts file, making it easier for others to use 
our device tree for a more focused purpose than our dev boards. I just 
didn't know where I should document why I disabled the nodes :)

~Bryan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
@ 2022-07-07 14:44   ` Bryan Brattlof
  0 siblings, 0 replies; 24+ messages in thread
From: Bryan Brattlof @ 2022-07-07 14:44 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel

Hi Andrew

On July  6, 2022 thus sayeth Andrew Davis:
> The hardware random number generator is used by OP-TEE and is access is
> denied to other users with SoC level bus firewalls. Any access to this
> device from Linux will result in firewall errors. Disable this node.
> 
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
> 
> Changes from v1:
>  - Added comment in dtsi file
> 
>  arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> index e749343accedd..9de5a8294acd6 100644
> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> @@ -127,6 +127,7 @@ rng: rng@4e10000 {
>  			reg = <0x0 0x4e10000 0x0 0x7d>;
>  			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>  			clocks = <&k3_clks 136 1>;
> +			status = "disabled"; /* Used by OP-TEE */

Just curious about how we should document disabling nodes. I was 
assuming the reasoning should be described in the bindings?

I would like to start disabling nodes by default in our dtsi files and 
enabling them in our top dts file, making it easier for others to use 
our device tree for a more focused purpose than our dev boards. I just 
didn't know where I should document why I disabled the nodes :)

~Bryan

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
  2022-07-07 14:44   ` Bryan Brattlof
@ 2022-07-07 15:01     ` Andrew Davis
  -1 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-07-07 15:01 UTC (permalink / raw)
  To: Bryan Brattlof
  Cc: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel

On 7/7/22 9:44 AM, Bryan Brattlof wrote:
> Hi Andrew
> 
> On July  6, 2022 thus sayeth Andrew Davis:
>> The hardware random number generator is used by OP-TEE and is access is
>> denied to other users with SoC level bus firewalls. Any access to this
>> device from Linux will result in firewall errors. Disable this node.
>>
>> Signed-off-by: Andrew Davis <afd@ti.com>
>> ---
>>
>> Changes from v1:
>>   - Added comment in dtsi file
>>
>>   arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>> index e749343accedd..9de5a8294acd6 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>> @@ -127,6 +127,7 @@ rng: rng@4e10000 {
>>   			reg = <0x0 0x4e10000 0x0 0x7d>;
>>   			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>>   			clocks = <&k3_clks 136 1>;
>> +			status = "disabled"; /* Used by OP-TEE */
> 
> Just curious about how we should document disabling nodes. I was
> assuming the reasoning should be described in the bindings?
> 
> I would like to start disabling nodes by default in our dtsi files and
> enabling them in our top dts file, making it easier for others to use
> our device tree for a more focused purpose than our dev boards. I just
> didn't know where I should document why I disabled the nodes :)
> 

This got push-back last time this was suggested, I'll have to lookup
the history. IIRC we landed on the other way around, all things should
be described by default, then the specific board can enable/disable
what is not used as needed.

I was worried this topic would come up with this patch series and was
almost just going to delete the whole RNG node instead of disabling it
to avoid that. My reasoning for disabling here anyway is that this device
*cannot* be used by *any* board, it is not just a board level configuration
decision like disabling I2C nodes by default or similar that was proposed
last time we had the "nodes disabled by default" discussion.

Andrew

> ~Bryan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
@ 2022-07-07 15:01     ` Andrew Davis
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-07-07 15:01 UTC (permalink / raw)
  To: Bryan Brattlof
  Cc: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel

On 7/7/22 9:44 AM, Bryan Brattlof wrote:
> Hi Andrew
> 
> On July  6, 2022 thus sayeth Andrew Davis:
>> The hardware random number generator is used by OP-TEE and is access is
>> denied to other users with SoC level bus firewalls. Any access to this
>> device from Linux will result in firewall errors. Disable this node.
>>
>> Signed-off-by: Andrew Davis <afd@ti.com>
>> ---
>>
>> Changes from v1:
>>   - Added comment in dtsi file
>>
>>   arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>> index e749343accedd..9de5a8294acd6 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>> @@ -127,6 +127,7 @@ rng: rng@4e10000 {
>>   			reg = <0x0 0x4e10000 0x0 0x7d>;
>>   			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>>   			clocks = <&k3_clks 136 1>;
>> +			status = "disabled"; /* Used by OP-TEE */
> 
> Just curious about how we should document disabling nodes. I was
> assuming the reasoning should be described in the bindings?
> 
> I would like to start disabling nodes by default in our dtsi files and
> enabling them in our top dts file, making it easier for others to use
> our device tree for a more focused purpose than our dev boards. I just
> didn't know where I should document why I disabled the nodes :)
> 

This got push-back last time this was suggested, I'll have to lookup
the history. IIRC we landed on the other way around, all things should
be described by default, then the specific board can enable/disable
what is not used as needed.

I was worried this topic would come up with this patch series and was
almost just going to delete the whole RNG node instead of disabling it
to avoid that. My reasoning for disabling here anyway is that this device
*cannot* be used by *any* board, it is not just a board level configuration
decision like disabling I2C nodes by default or similar that was proposed
last time we had the "nodes disabled by default" discussion.

Andrew

> ~Bryan

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
  2022-07-07 15:01     ` Andrew Davis
@ 2022-07-07 17:17       ` Nishanth Menon
  -1 siblings, 0 replies; 24+ messages in thread
From: Nishanth Menon @ 2022-07-07 17:17 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Bryan Brattlof, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel

On 10:01-20220707, Andrew Davis wrote:
> On 7/7/22 9:44 AM, Bryan Brattlof wrote:
> > Hi Andrew
> > 
> > On July  6, 2022 thus sayeth Andrew Davis:
> > > The hardware random number generator is used by OP-TEE and is access is
> > > denied to other users with SoC level bus firewalls. Any access to this
> > > device from Linux will result in firewall errors. Disable this node.
> > > 
> > > Signed-off-by: Andrew Davis <afd@ti.com>
> > > ---
> > > 
> > > Changes from v1:
> > >   - Added comment in dtsi file
> > > 
> > >   arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
> > >   1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > index e749343accedd..9de5a8294acd6 100644
> > > --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > @@ -127,6 +127,7 @@ rng: rng@4e10000 {
> > >   			reg = <0x0 0x4e10000 0x0 0x7d>;
> > >   			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
> > >   			clocks = <&k3_clks 136 1>;
> > > +			status = "disabled"; /* Used by OP-TEE */
> > 
> > Just curious about how we should document disabling nodes. I was
> > assuming the reasoning should be described in the bindings?
> > 
> > I would like to start disabling nodes by default in our dtsi files and
> > enabling them in our top dts file, making it easier for others to use
> > our device tree for a more focused purpose than our dev boards. I just
> > didn't know where I should document why I disabled the nodes :)
> > 
> 
> This got push-back last time this was suggested, I'll have to lookup
> the history. IIRC we landed on the other way around, all things should
> be described by default, then the specific board can enable/disable
> what is not used as needed.

See thread https://lore.kernel.org/linux-arm-kernel/YiizsYnKB0X9bDY2@atomide.com/

> 
> I was worried this topic would come up with this patch series and was
> almost just going to delete the whole RNG node instead of disabling it
> to avoid that. My reasoning for disabling here anyway is that this device
> *cannot* be used by *any* board, it is not just a board level configuration
> decision like disabling I2C nodes by default or similar that was proposed
> last time we had the "nodes disabled by default" discussion.

Hmm.. If that is the case, then why even have it in dts - is that
because of cases where OPTEE is'nt the TEE and users may want to
directly use it? OR is it because OPTEE can potentially use device tree
itself and discover the rng location from dt?


-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
@ 2022-07-07 17:17       ` Nishanth Menon
  0 siblings, 0 replies; 24+ messages in thread
From: Nishanth Menon @ 2022-07-07 17:17 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Bryan Brattlof, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel

On 10:01-20220707, Andrew Davis wrote:
> On 7/7/22 9:44 AM, Bryan Brattlof wrote:
> > Hi Andrew
> > 
> > On July  6, 2022 thus sayeth Andrew Davis:
> > > The hardware random number generator is used by OP-TEE and is access is
> > > denied to other users with SoC level bus firewalls. Any access to this
> > > device from Linux will result in firewall errors. Disable this node.
> > > 
> > > Signed-off-by: Andrew Davis <afd@ti.com>
> > > ---
> > > 
> > > Changes from v1:
> > >   - Added comment in dtsi file
> > > 
> > >   arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
> > >   1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > index e749343accedd..9de5a8294acd6 100644
> > > --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > @@ -127,6 +127,7 @@ rng: rng@4e10000 {
> > >   			reg = <0x0 0x4e10000 0x0 0x7d>;
> > >   			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
> > >   			clocks = <&k3_clks 136 1>;
> > > +			status = "disabled"; /* Used by OP-TEE */
> > 
> > Just curious about how we should document disabling nodes. I was
> > assuming the reasoning should be described in the bindings?
> > 
> > I would like to start disabling nodes by default in our dtsi files and
> > enabling them in our top dts file, making it easier for others to use
> > our device tree for a more focused purpose than our dev boards. I just
> > didn't know where I should document why I disabled the nodes :)
> > 
> 
> This got push-back last time this was suggested, I'll have to lookup
> the history. IIRC we landed on the other way around, all things should
> be described by default, then the specific board can enable/disable
> what is not used as needed.

See thread https://lore.kernel.org/linux-arm-kernel/YiizsYnKB0X9bDY2@atomide.com/

> 
> I was worried this topic would come up with this patch series and was
> almost just going to delete the whole RNG node instead of disabling it
> to avoid that. My reasoning for disabling here anyway is that this device
> *cannot* be used by *any* board, it is not just a board level configuration
> decision like disabling I2C nodes by default or similar that was proposed
> last time we had the "nodes disabled by default" discussion.

Hmm.. If that is the case, then why even have it in dts - is that
because of cases where OPTEE is'nt the TEE and users may want to
directly use it? OR is it because OPTEE can potentially use device tree
itself and discover the rng location from dt?


-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
  2022-07-07 17:17       ` Nishanth Menon
@ 2022-07-07 17:36         ` Andrew Davis
  -1 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-07-07 17:36 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Bryan Brattlof, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel

On 7/7/22 12:17 PM, Nishanth Menon wrote:
> On 10:01-20220707, Andrew Davis wrote:
>> On 7/7/22 9:44 AM, Bryan Brattlof wrote:
>>> Hi Andrew
>>>
>>> On July  6, 2022 thus sayeth Andrew Davis:
>>>> The hardware random number generator is used by OP-TEE and is access is
>>>> denied to other users with SoC level bus firewalls. Any access to this
>>>> device from Linux will result in firewall errors. Disable this node.
>>>>
>>>> Signed-off-by: Andrew Davis <afd@ti.com>
>>>> ---
>>>>
>>>> Changes from v1:
>>>>    - Added comment in dtsi file
>>>>
>>>>    arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
>>>>    1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>>>> index e749343accedd..9de5a8294acd6 100644
>>>> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>>>> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>>>> @@ -127,6 +127,7 @@ rng: rng@4e10000 {
>>>>    			reg = <0x0 0x4e10000 0x0 0x7d>;
>>>>    			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>>>>    			clocks = <&k3_clks 136 1>;
>>>> +			status = "disabled"; /* Used by OP-TEE */
>>>
>>> Just curious about how we should document disabling nodes. I was
>>> assuming the reasoning should be described in the bindings?
>>>
>>> I would like to start disabling nodes by default in our dtsi files and
>>> enabling them in our top dts file, making it easier for others to use
>>> our device tree for a more focused purpose than our dev boards. I just
>>> didn't know where I should document why I disabled the nodes :)
>>>
>>
>> This got push-back last time this was suggested, I'll have to lookup
>> the history. IIRC we landed on the other way around, all things should
>> be described by default, then the specific board can enable/disable
>> what is not used as needed.
> 
> See thread https://lore.kernel.org/linux-arm-kernel/YiizsYnKB0X9bDY2@atomide.com/
> 
>>
>> I was worried this topic would come up with this patch series and was
>> almost just going to delete the whole RNG node instead of disabling it
>> to avoid that. My reasoning for disabling here anyway is that this device
>> *cannot* be used by *any* board, it is not just a board level configuration
>> decision like disabling I2C nodes by default or similar that was proposed
>> last time we had the "nodes disabled by default" discussion.
> 
> Hmm.. If that is the case, then why even have it in dts - is that
> because of cases where OPTEE is'nt the TEE and users may want to
> directly use it? OR is it because OPTEE can potentially use device tree
> itself and discover the rng location from dt?
> 

Hadn't thought about the second case, but it could also be valid if we
started using DT in our OPTEE. The intention was for the first case,
this node has valid hardware description, didn't feel right to delete
it due to it being unusable by Linux.

Andrew

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
@ 2022-07-07 17:36         ` Andrew Davis
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-07-07 17:36 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Bryan Brattlof, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel

On 7/7/22 12:17 PM, Nishanth Menon wrote:
> On 10:01-20220707, Andrew Davis wrote:
>> On 7/7/22 9:44 AM, Bryan Brattlof wrote:
>>> Hi Andrew
>>>
>>> On July  6, 2022 thus sayeth Andrew Davis:
>>>> The hardware random number generator is used by OP-TEE and is access is
>>>> denied to other users with SoC level bus firewalls. Any access to this
>>>> device from Linux will result in firewall errors. Disable this node.
>>>>
>>>> Signed-off-by: Andrew Davis <afd@ti.com>
>>>> ---
>>>>
>>>> Changes from v1:
>>>>    - Added comment in dtsi file
>>>>
>>>>    arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
>>>>    1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>>>> index e749343accedd..9de5a8294acd6 100644
>>>> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>>>> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
>>>> @@ -127,6 +127,7 @@ rng: rng@4e10000 {
>>>>    			reg = <0x0 0x4e10000 0x0 0x7d>;
>>>>    			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>>>>    			clocks = <&k3_clks 136 1>;
>>>> +			status = "disabled"; /* Used by OP-TEE */
>>>
>>> Just curious about how we should document disabling nodes. I was
>>> assuming the reasoning should be described in the bindings?
>>>
>>> I would like to start disabling nodes by default in our dtsi files and
>>> enabling them in our top dts file, making it easier for others to use
>>> our device tree for a more focused purpose than our dev boards. I just
>>> didn't know where I should document why I disabled the nodes :)
>>>
>>
>> This got push-back last time this was suggested, I'll have to lookup
>> the history. IIRC we landed on the other way around, all things should
>> be described by default, then the specific board can enable/disable
>> what is not used as needed.
> 
> See thread https://lore.kernel.org/linux-arm-kernel/YiizsYnKB0X9bDY2@atomide.com/
> 
>>
>> I was worried this topic would come up with this patch series and was
>> almost just going to delete the whole RNG node instead of disabling it
>> to avoid that. My reasoning for disabling here anyway is that this device
>> *cannot* be used by *any* board, it is not just a board level configuration
>> decision like disabling I2C nodes by default or similar that was proposed
>> last time we had the "nodes disabled by default" discussion.
> 
> Hmm.. If that is the case, then why even have it in dts - is that
> because of cases where OPTEE is'nt the TEE and users may want to
> directly use it? OR is it because OPTEE can potentially use device tree
> itself and discover the rng location from dt?
> 

Hadn't thought about the second case, but it could also be valid if we
started using DT in our OPTEE. The intention was for the first case,
this node has valid hardware description, didn't feel right to delete
it due to it being unusable by Linux.

Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
  2022-07-07 17:36         ` Andrew Davis
@ 2022-07-08 22:09           ` Nishanth Menon
  -1 siblings, 0 replies; 24+ messages in thread
From: Nishanth Menon @ 2022-07-08 22:09 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Bryan Brattlof, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel

On 12:36-20220707, Andrew Davis wrote:
> On 7/7/22 12:17 PM, Nishanth Menon wrote:
> > On 10:01-20220707, Andrew Davis wrote:
> > > On 7/7/22 9:44 AM, Bryan Brattlof wrote:
> > > > Hi Andrew
> > > > 
> > > > On July  6, 2022 thus sayeth Andrew Davis:
> > > > > The hardware random number generator is used by OP-TEE and is access is
> > > > > denied to other users with SoC level bus firewalls. Any access to this
> > > > > device from Linux will result in firewall errors. Disable this node.
> > > > > 
> > > > > Signed-off-by: Andrew Davis <afd@ti.com>
> > > > > ---
> > > > > 
> > > > > Changes from v1:
> > > > >    - Added comment in dtsi file
> > > > > 
> > > > >    arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
> > > > >    1 file changed, 1 insertion(+)
> > > > > 
> > > > > diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > > > index e749343accedd..9de5a8294acd6 100644
> > > > > --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > > > +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > > > @@ -127,6 +127,7 @@ rng: rng@4e10000 {
> > > > >    			reg = <0x0 0x4e10000 0x0 0x7d>;
> > > > >    			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
> > > > >    			clocks = <&k3_clks 136 1>;
> > > > > +			status = "disabled"; /* Used by OP-TEE */
> > > > 
> > > > Just curious about how we should document disabling nodes. I was
> > > > assuming the reasoning should be described in the bindings?
> > > > 
> > > > I would like to start disabling nodes by default in our dtsi files and
> > > > enabling them in our top dts file, making it easier for others to use
> > > > our device tree for a more focused purpose than our dev boards. I just
> > > > didn't know where I should document why I disabled the nodes :)
> > > > 
> > > 
> > > This got push-back last time this was suggested, I'll have to lookup
> > > the history. IIRC we landed on the other way around, all things should
> > > be described by default, then the specific board can enable/disable
> > > what is not used as needed.
> > 
> > See thread https://lore.kernel.org/linux-arm-kernel/YiizsYnKB0X9bDY2@atomide.com/
> > 
> > > 
> > > I was worried this topic would come up with this patch series and was
> > > almost just going to delete the whole RNG node instead of disabling it
> > > to avoid that. My reasoning for disabling here anyway is that this device
> > > *cannot* be used by *any* board, it is not just a board level configuration
> > > decision like disabling I2C nodes by default or similar that was proposed
> > > last time we had the "nodes disabled by default" discussion.
> > 
> > Hmm.. If that is the case, then why even have it in dts - is that
> > because of cases where OPTEE is'nt the TEE and users may want to
> > directly use it? OR is it because OPTEE can potentially use device tree
> > itself and discover the rng location from dt?
> > 
> 
> Hadn't thought about the second case, but it could also be valid if we
> started using DT in our OPTEE. The intention was for the first case,
> this node has valid hardware description, didn't feel right to delete
> it due to it being unusable by Linux.


Fair enough, it is a bit late for me to let this series cook in list and
then apply and wait for linux-next stability before I tag for next
kernel, I suggest improving the commit message with rationale in the
next rev.

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
@ 2022-07-08 22:09           ` Nishanth Menon
  0 siblings, 0 replies; 24+ messages in thread
From: Nishanth Menon @ 2022-07-08 22:09 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Bryan Brattlof, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel

On 12:36-20220707, Andrew Davis wrote:
> On 7/7/22 12:17 PM, Nishanth Menon wrote:
> > On 10:01-20220707, Andrew Davis wrote:
> > > On 7/7/22 9:44 AM, Bryan Brattlof wrote:
> > > > Hi Andrew
> > > > 
> > > > On July  6, 2022 thus sayeth Andrew Davis:
> > > > > The hardware random number generator is used by OP-TEE and is access is
> > > > > denied to other users with SoC level bus firewalls. Any access to this
> > > > > device from Linux will result in firewall errors. Disable this node.
> > > > > 
> > > > > Signed-off-by: Andrew Davis <afd@ti.com>
> > > > > ---
> > > > > 
> > > > > Changes from v1:
> > > > >    - Added comment in dtsi file
> > > > > 
> > > > >    arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
> > > > >    1 file changed, 1 insertion(+)
> > > > > 
> > > > > diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > > > index e749343accedd..9de5a8294acd6 100644
> > > > > --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > > > +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> > > > > @@ -127,6 +127,7 @@ rng: rng@4e10000 {
> > > > >    			reg = <0x0 0x4e10000 0x0 0x7d>;
> > > > >    			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
> > > > >    			clocks = <&k3_clks 136 1>;
> > > > > +			status = "disabled"; /* Used by OP-TEE */
> > > > 
> > > > Just curious about how we should document disabling nodes. I was
> > > > assuming the reasoning should be described in the bindings?
> > > > 
> > > > I would like to start disabling nodes by default in our dtsi files and
> > > > enabling them in our top dts file, making it easier for others to use
> > > > our device tree for a more focused purpose than our dev boards. I just
> > > > didn't know where I should document why I disabled the nodes :)
> > > > 
> > > 
> > > This got push-back last time this was suggested, I'll have to lookup
> > > the history. IIRC we landed on the other way around, all things should
> > > be described by default, then the specific board can enable/disable
> > > what is not used as needed.
> > 
> > See thread https://lore.kernel.org/linux-arm-kernel/YiizsYnKB0X9bDY2@atomide.com/
> > 
> > > 
> > > I was worried this topic would come up with this patch series and was
> > > almost just going to delete the whole RNG node instead of disabling it
> > > to avoid that. My reasoning for disabling here anyway is that this device
> > > *cannot* be used by *any* board, it is not just a board level configuration
> > > decision like disabling I2C nodes by default or similar that was proposed
> > > last time we had the "nodes disabled by default" discussion.
> > 
> > Hmm.. If that is the case, then why even have it in dts - is that
> > because of cases where OPTEE is'nt the TEE and users may want to
> > directly use it? OR is it because OPTEE can potentially use device tree
> > itself and discover the rng location from dt?
> > 
> 
> Hadn't thought about the second case, but it could also be valid if we
> started using DT in our OPTEE. The intention was for the first case,
> this node has valid hardware description, didn't feel right to delete
> it due to it being unusable by Linux.


Fair enough, it is a bit late for me to let this series cook in list and
then apply and wait for linux-next stability before I tag for next
kernel, I suggest improving the commit message with rationale in the
next rev.

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
  2022-08-23  0:11 ` Andrew Davis
@ 2022-09-09  9:56   ` Vignesh Raghavendra
  -1 siblings, 0 replies; 24+ messages in thread
From: Vignesh Raghavendra @ 2022-09-09  9:56 UTC (permalink / raw)
  To: Rob Herring, Nishanth Menon, linux-arm-kernel, Andrew Davis,
	Krzysztof Kozlowski, linux-kernel, Tero Kristo, devicetree
  Cc: Vignesh Raghavendra

Hi Andrew Davis,

On Mon, 22 Aug 2022 19:11:33 -0500, Andrew Davis wrote:
> The hardware random number generator is used by OP-TEE and is access is
> denied to other users with SoC level bus firewalls. Any access to this
> device from Linux will result in firewall errors.
> 
> We could remove this node, but it is still valid device description,
> and it is possible it could be re-enabled in the bootloader if OP-TEE
> is not used. So only disable this node for now.
> 
> [...]

I have applied the following to branch master on [1].
Thank you!

[1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
      commit: 1ad4669b4bbe6b72784acdb5b24f72b22ad8f1d1
[2/4] arm64: dts: ti: k3-am65-main: Move SA2UL to unused PSI-L thread ID
      commit: 530eaa573a33fdd86725fdd2b979cbbbc539d47c
[3/4] arm64: dts: ti: k3-am65-main: Do not exclusively claim SA2UL
      commit: 49611f43e035f30be685fcf7468f23e85ce2ee06
[4/4] arm64: dts: ti: k3-j7200-mcu-wakeup: Add SA2UL node
      commit: d683a73980a61cc5d8abea7f3f996028e64e9144

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
@ 2022-09-09  9:56   ` Vignesh Raghavendra
  0 siblings, 0 replies; 24+ messages in thread
From: Vignesh Raghavendra @ 2022-09-09  9:56 UTC (permalink / raw)
  To: Rob Herring, Nishanth Menon, linux-arm-kernel, Andrew Davis,
	Krzysztof Kozlowski, linux-kernel, Tero Kristo, devicetree
  Cc: Vignesh Raghavendra

Hi Andrew Davis,

On Mon, 22 Aug 2022 19:11:33 -0500, Andrew Davis wrote:
> The hardware random number generator is used by OP-TEE and is access is
> denied to other users with SoC level bus firewalls. Any access to this
> device from Linux will result in firewall errors.
> 
> We could remove this node, but it is still valid device description,
> and it is possible it could be re-enabled in the bootloader if OP-TEE
> is not used. So only disable this node for now.
> 
> [...]

I have applied the following to branch master on [1].
Thank you!

[1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
      commit: 1ad4669b4bbe6b72784acdb5b24f72b22ad8f1d1
[2/4] arm64: dts: ti: k3-am65-main: Move SA2UL to unused PSI-L thread ID
      commit: 530eaa573a33fdd86725fdd2b979cbbbc539d47c
[3/4] arm64: dts: ti: k3-am65-main: Do not exclusively claim SA2UL
      commit: 49611f43e035f30be685fcf7468f23e85ce2ee06
[4/4] arm64: dts: ti: k3-j7200-mcu-wakeup: Add SA2UL node
      commit: d683a73980a61cc5d8abea7f3f996028e64e9144

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
  2022-08-23  0:11 ` Andrew Davis
@ 2022-08-30  9:54   ` Jayesh Choudhary
  -1 siblings, 0 replies; 24+ messages in thread
From: Jayesh Choudhary @ 2022-08-30  9:54 UTC (permalink / raw)
  To: Andrew Davis, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
	Rob Herring, Krzysztof Kozlowski, linux-arm-kernel, devicetree,
	linux-kernel



On 23/08/22 05:41, Andrew Davis wrote:
> The hardware random number generator is used by OP-TEE and is access is
> denied to other users with SoC level bus firewalls. Any access to this
> device from Linux will result in firewall errors.
> 
> We could remove this node, but it is still valid device description,
> and it is possible it could be re-enabled in the bootloader if OP-TEE
> is not used. So only disable this node for now.
> 
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
> 
> Changes from v1:
>   - Added comment in DT
>   - Explained why it is only disabled in commit message
> 
>   arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> index 8919fede3cd7..b3e714e1abed 100644
> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> @@ -127,6 +127,7 @@ rng: rng@4e10000 {
>   			reg = <0x0 0x4e10000 0x0 0x7d>;
>   			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>   			clocks = <&k3_clks 136 1>;
> +			status = "disabled"; /* Used by OP-TEE */
>   		};
>   	};
>   

Reviewed-by: Jayesh Choudhary <j-choudhary@ti.com>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
@ 2022-08-30  9:54   ` Jayesh Choudhary
  0 siblings, 0 replies; 24+ messages in thread
From: Jayesh Choudhary @ 2022-08-30  9:54 UTC (permalink / raw)
  To: Andrew Davis, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
	Rob Herring, Krzysztof Kozlowski, linux-arm-kernel, devicetree,
	linux-kernel



On 23/08/22 05:41, Andrew Davis wrote:
> The hardware random number generator is used by OP-TEE and is access is
> denied to other users with SoC level bus firewalls. Any access to this
> device from Linux will result in firewall errors.
> 
> We could remove this node, but it is still valid device description,
> and it is possible it could be re-enabled in the bootloader if OP-TEE
> is not used. So only disable this node for now.
> 
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
> 
> Changes from v1:
>   - Added comment in DT
>   - Explained why it is only disabled in commit message
> 
>   arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> index 8919fede3cd7..b3e714e1abed 100644
> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> @@ -127,6 +127,7 @@ rng: rng@4e10000 {
>   			reg = <0x0 0x4e10000 0x0 0x7d>;
>   			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>   			clocks = <&k3_clks 136 1>;
> +			status = "disabled"; /* Used by OP-TEE */
>   		};
>   	};
>   

Reviewed-by: Jayesh Choudhary <j-choudhary@ti.com>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
@ 2022-08-23  0:11 ` Andrew Davis
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-08-23  0:11 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel
  Cc: Andrew Davis

The hardware random number generator is used by OP-TEE and is access is
denied to other users with SoC level bus firewalls. Any access to this
device from Linux will result in firewall errors.

We could remove this node, but it is still valid device description,
and it is possible it could be re-enabled in the bootloader if OP-TEE
is not used. So only disable this node for now.

Signed-off-by: Andrew Davis <afd@ti.com>
---

Changes from v1:
 - Added comment in DT
 - Explained why it is only disabled in commit message

 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index 8919fede3cd7..b3e714e1abed 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -127,6 +127,7 @@ rng: rng@4e10000 {
 			reg = <0x0 0x4e10000 0x0 0x7d>;
 			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&k3_clks 136 1>;
+			status = "disabled"; /* Used by OP-TEE */
 		};
 	};
 
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node
@ 2022-08-23  0:11 ` Andrew Davis
  0 siblings, 0 replies; 24+ messages in thread
From: Andrew Davis @ 2022-08-23  0:11 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, linux-kernel
  Cc: Andrew Davis

The hardware random number generator is used by OP-TEE and is access is
denied to other users with SoC level bus firewalls. Any access to this
device from Linux will result in firewall errors.

We could remove this node, but it is still valid device description,
and it is possible it could be re-enabled in the bootloader if OP-TEE
is not used. So only disable this node for now.

Signed-off-by: Andrew Davis <afd@ti.com>
---

Changes from v1:
 - Added comment in DT
 - Explained why it is only disabled in commit message

 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index 8919fede3cd7..b3e714e1abed 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -127,6 +127,7 @@ rng: rng@4e10000 {
 			reg = <0x0 0x4e10000 0x0 0x7d>;
 			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&k3_clks 136 1>;
+			status = "disabled"; /* Used by OP-TEE */
 		};
 	};
 
-- 
2.36.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2022-09-09  9:57 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06 19:08 [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node Andrew Davis
2022-07-06 19:08 ` Andrew Davis
2022-07-06 19:08 ` [PATCH v2 2/4] arm64: dts: ti: k3-am65-main: Move SA2UL to unused PSI-L thread ID Andrew Davis
2022-07-06 19:08   ` Andrew Davis
2022-07-06 19:08 ` [PATCH v2 3/4] arm64: dts: ti: k3-am65-main: Do not exclusively claim SA2UL Andrew Davis
2022-07-06 19:08   ` Andrew Davis
2022-07-06 19:08 ` [PATCH v2 4/4] arm64: dts: ti: k3-j7200-mcu-wakeup: Add SA2UL node Andrew Davis
2022-07-06 19:08   ` Andrew Davis
2022-07-07 14:44 ` [PATCH v2 1/4] arm64: dts: ti: k3-am65-main: Disable RNG node Bryan Brattlof
2022-07-07 14:44   ` Bryan Brattlof
2022-07-07 15:01   ` Andrew Davis
2022-07-07 15:01     ` Andrew Davis
2022-07-07 17:17     ` Nishanth Menon
2022-07-07 17:17       ` Nishanth Menon
2022-07-07 17:36       ` Andrew Davis
2022-07-07 17:36         ` Andrew Davis
2022-07-08 22:09         ` Nishanth Menon
2022-07-08 22:09           ` Nishanth Menon
2022-08-23  0:11 Andrew Davis
2022-08-23  0:11 ` Andrew Davis
2022-08-30  9:54 ` Jayesh Choudhary
2022-08-30  9:54   ` Jayesh Choudhary
2022-09-09  9:56 ` Vignesh Raghavendra
2022-09-09  9:56   ` Vignesh Raghavendra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.