devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] arm64: zynqmp: add firmware device tree node
@ 2019-10-18 16:07 Michael Tretter
  2019-10-18 16:07 ` [PATCH 1/5] arm64: zynqmp: Add firmware DT node Michael Tretter
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Michael Tretter @ 2019-10-18 16:07 UTC (permalink / raw)
  To: robh+dt, mark.rutland, michal.simek, devicetree
  Cc: linux-arm-kernel, Michael Tretter

Hi,

this patch series adds the device tree node for the ZynqMP PMU firmware and
the subnodes for the pcap fpga loader and the efuses to the ZynqMP device
tree. While the bindings have been mainlined, the actual device tree nodes
were never added to mainline, but were left in the Xilinx downstream
repository [0].

I cherry-picked the patches from the downstream repo and slightly adjusted
them to the mainlined device tree bindings to be able to actually use the
devices with the mainline kernel and device tree.

Michael

[0] https://github.com/Xilinx/linux-xlnx

Durga Challa (1):
  arm64: zynqmp: Add data cells to access efuse

Nava kishore Manne (3):
  arm64: zynqmp: Add support for zynqmp fpga manager
  arm64: zynqmp: Label whole PL part as fpga_full region
  arm64: zynqmp: Add support for zynqmp nvmem firmware driver

Rajan Vaja (1):
  arm64: zynqmp: Add firmware DT node

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 77 ++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)

-- 
2.20.1


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

* [PATCH 1/5] arm64: zynqmp: Add firmware DT node
  2019-10-18 16:07 [PATCH 0/5] arm64: zynqmp: add firmware device tree node Michael Tretter
@ 2019-10-18 16:07 ` Michael Tretter
  2019-12-08 22:38   ` Guenter Roeck
  2019-10-18 16:07 ` [PATCH 2/5] arm64: zynqmp: Add support for zynqmp fpga manager Michael Tretter
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Michael Tretter @ 2019-10-18 16:07 UTC (permalink / raw)
  To: robh+dt, mark.rutland, michal.simek, devicetree
  Cc: linux-arm-kernel, Rajan Vaja, Rajan Vaja, Michael Tretter

From: Rajan Vaja <rajan.vaja@xilinx.com>

Add firmware DT node in ZynqMP device tree. This node
uses bindings as per new firmware interface driver.

Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
index 9aa67340a4d8..9115eaebbf70 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
+++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
@@ -115,6 +115,13 @@
 		method = "smc";
 	};
 
+	firmware {
+		zynqmp_firmware: zynqmp-firmware {
+			compatible = "xlnx,zynqmp-firmware";
+			method = "smc";
+		};
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupt-parent = <&gic>;
-- 
2.20.1


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

* [PATCH 2/5] arm64: zynqmp: Add support for zynqmp fpga manager
  2019-10-18 16:07 [PATCH 0/5] arm64: zynqmp: add firmware device tree node Michael Tretter
  2019-10-18 16:07 ` [PATCH 1/5] arm64: zynqmp: Add firmware DT node Michael Tretter
@ 2019-10-18 16:07 ` Michael Tretter
  2019-10-18 16:07 ` [PATCH 3/5] arm64: zynqmp: Label whole PL part as fpga_full region Michael Tretter
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Michael Tretter @ 2019-10-18 16:07 UTC (permalink / raw)
  To: robh+dt, mark.rutland, michal.simek, devicetree
  Cc: linux-arm-kernel, Nava kishore Manne, Nava kishore Manne,
	Michael Tretter

From: Nava kishore Manne <nava.manne@xilinx.com>

Add support for zynqmp fpga manager.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[m.tretter@pengutronix.de: moved to subnode of firmware]
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
index 9115eaebbf70..43f01dca1f78 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
+++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
@@ -119,6 +119,10 @@
 		zynqmp_firmware: zynqmp-firmware {
 			compatible = "xlnx,zynqmp-firmware";
 			method = "smc";
+
+			zynqmp_pcap: pcap {
+				compatible = "xlnx,zynqmp-pcap-fpga";
+			};
 		};
 	};
 
-- 
2.20.1


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

* [PATCH 3/5] arm64: zynqmp: Label whole PL part as fpga_full region
  2019-10-18 16:07 [PATCH 0/5] arm64: zynqmp: add firmware device tree node Michael Tretter
  2019-10-18 16:07 ` [PATCH 1/5] arm64: zynqmp: Add firmware DT node Michael Tretter
  2019-10-18 16:07 ` [PATCH 2/5] arm64: zynqmp: Add support for zynqmp fpga manager Michael Tretter
@ 2019-10-18 16:07 ` Michael Tretter
  2019-10-18 16:07 ` [PATCH 4/5] arm64: zynqmp: Add support for zynqmp nvmem firmware driver Michael Tretter
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Michael Tretter @ 2019-10-18 16:07 UTC (permalink / raw)
  To: robh+dt, mark.rutland, michal.simek, devicetree
  Cc: linux-arm-kernel, Nava kishore Manne, Nava kishore Manne,
	Michael Tretter

From: Nava kishore Manne <nava.manne@xilinx.com>

This will simplify dt overlay structure for the whole PL.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
index 43f01dca1f78..e72343756f7b 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
+++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
@@ -135,6 +135,14 @@
 			     <1 10 0xf08>;
 	};
 
+	fpga_full: fpga-full {
+		compatible = "fpga-region";
+		fpga-mgr = <&zynqmp_pcap>;
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+	};
+
 	amba_apu: amba-apu@0 {
 		compatible = "simple-bus";
 		#address-cells = <2>;
-- 
2.20.1


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

* [PATCH 4/5] arm64: zynqmp: Add support for zynqmp nvmem firmware driver
  2019-10-18 16:07 [PATCH 0/5] arm64: zynqmp: add firmware device tree node Michael Tretter
                   ` (2 preceding siblings ...)
  2019-10-18 16:07 ` [PATCH 3/5] arm64: zynqmp: Label whole PL part as fpga_full region Michael Tretter
@ 2019-10-18 16:07 ` Michael Tretter
  2019-10-18 16:07 ` [PATCH 5/5] arm64: zynqmp: Add data cells to access efuse Michael Tretter
  2019-10-23 12:30 ` [PATCH 0/5] arm64: zynqmp: add firmware device tree node Michal Simek
  5 siblings, 0 replies; 18+ messages in thread
From: Michael Tretter @ 2019-10-18 16:07 UTC (permalink / raw)
  To: robh+dt, mark.rutland, michal.simek, devicetree
  Cc: linux-arm-kernel, Nava kishore Manne, Nava kishore Manne,
	Michael Tretter

From: Nava kishore Manne <nava.manne@xilinx.com>

Add support for zynqmp nvmem firmware driver.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[m.tretter@pengutronix.de: move to subnode of firmware]
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
index e72343756f7b..3c731e73903a 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
+++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
@@ -120,6 +120,16 @@
 			compatible = "xlnx,zynqmp-firmware";
 			method = "smc";
 
+			nvmem_firmware {
+				compatible = "xlnx,zynqmp-nvmem-fw";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				soc_revision: soc_revision@0 {
+					reg = <0x0 0x4>;
+				};
+			};
+
 			zynqmp_pcap: pcap {
 				compatible = "xlnx,zynqmp-pcap-fpga";
 			};
-- 
2.20.1


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

* [PATCH 5/5] arm64: zynqmp: Add data cells to access efuse
  2019-10-18 16:07 [PATCH 0/5] arm64: zynqmp: add firmware device tree node Michael Tretter
                   ` (3 preceding siblings ...)
  2019-10-18 16:07 ` [PATCH 4/5] arm64: zynqmp: Add support for zynqmp nvmem firmware driver Michael Tretter
@ 2019-10-18 16:07 ` Michael Tretter
  2019-10-23 12:30   ` Michal Simek
  2019-10-23 12:30 ` [PATCH 0/5] arm64: zynqmp: add firmware device tree node Michal Simek
  5 siblings, 1 reply; 18+ messages in thread
From: Michael Tretter @ 2019-10-18 16:07 UTC (permalink / raw)
  To: robh+dt, mark.rutland, michal.simek, devicetree
  Cc: linux-arm-kernel, Durga Challa, Michael Tretter

From: Durga Challa <vnsl.durga.challa@xilinx.com>

This patch adds data cells under nvmem node to
read efuse memory

Signed-off-by: Durga Challa <vnsl.durga.challa@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 48 ++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
index 3c731e73903a..73d26177eb96 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
+++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
@@ -128,6 +128,54 @@
 				soc_revision: soc_revision@0 {
 					reg = <0x0 0x4>;
 				};
+				efuse_dna: efuse_dna@c {
+					reg = <0xc 0xc>;
+				};
+				efuse_usr0: efuse_usr0@20 {
+					reg = <0x20 0x4>;
+				};
+				efuse_usr1: efuse_usr1@24 {
+					reg = <0x24 0x4>;
+				};
+				efuse_usr2: efuse_usr2@28 {
+					reg = <0x28 0x4>;
+				};
+				efuse_usr3: efuse_usr3@2c {
+					reg = <0x2c 0x4>;
+				};
+				efuse_usr4: efuse_usr4@30 {
+					reg = <0x30 0x4>;
+				};
+				efuse_usr5: efuse_usr5@34 {
+					reg = <0x34 0x4>;
+				};
+				efuse_usr6: efuse_usr6@38 {
+					reg = <0x38 0x4>;
+				};
+				efuse_usr7: efuse_usr7@3c {
+					reg = <0x3c 0x4>;
+				};
+				efuse_miscusr: efuse_miscusr@40 {
+					reg = <0x40 0x4>;
+				};
+				efuse_chash: efuse_chash@50 {
+					reg = <0x50 0x4>;
+				};
+				efuse_pufmisc: efuse_pufmisc@54 {
+					reg = <0x54 0x4>;
+				};
+				efuse_sec: efuse_sec@58 {
+					reg = <0x58 0x4>;
+				};
+				efuse_spkid: efuse_spkid@5c {
+					reg = <0x5c 0x4>;
+				};
+				efuse_ppk0hash: efuse_ppk0hash@a0 {
+					reg = <0xa0 0x30>;
+				};
+				efuse_ppk1hash: efuse_ppk1hash@d0 {
+					reg = <0xd0 0x30>;
+				};
 			};
 
 			zynqmp_pcap: pcap {
-- 
2.20.1


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

* Re: [PATCH 0/5] arm64: zynqmp: add firmware device tree node
  2019-10-18 16:07 [PATCH 0/5] arm64: zynqmp: add firmware device tree node Michael Tretter
                   ` (4 preceding siblings ...)
  2019-10-18 16:07 ` [PATCH 5/5] arm64: zynqmp: Add data cells to access efuse Michael Tretter
@ 2019-10-23 12:30 ` Michal Simek
  5 siblings, 0 replies; 18+ messages in thread
From: Michal Simek @ 2019-10-23 12:30 UTC (permalink / raw)
  To: Michael Tretter, robh+dt, mark.rutland, michal.simek, devicetree
  Cc: linux-arm-kernel

On 18. 10. 19 18:07, Michael Tretter wrote:
> Hi,
> 
> this patch series adds the device tree node for the ZynqMP PMU firmware and
> the subnodes for the pcap fpga loader and the efuses to the ZynqMP device
> tree. While the bindings have been mainlined, the actual device tree nodes
> were never added to mainline, but were left in the Xilinx downstream
> repository [0].
> 
> I cherry-picked the patches from the downstream repo and slightly adjusted
> them to the mainlined device tree bindings to be able to actually use the
> devices with the mainline kernel and device tree.
> 
> Michael
> 
> [0] https://github.com/Xilinx/linux-xlnx
> 
> Durga Challa (1):
>   arm64: zynqmp: Add data cells to access efuse
> 
> Nava kishore Manne (3):
>   arm64: zynqmp: Add support for zynqmp fpga manager
>   arm64: zynqmp: Label whole PL part as fpga_full region
>   arm64: zynqmp: Add support for zynqmp nvmem firmware driver
> 
> Rajan Vaja (1):
>   arm64: zynqmp: Add firmware DT node
> 
>  arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 77 ++++++++++++++++++++++++++
>  1 file changed, 77 insertions(+)
> 

Applied 1-4.

Thanks,
Michal

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

* Re: [PATCH 5/5] arm64: zynqmp: Add data cells to access efuse
  2019-10-18 16:07 ` [PATCH 5/5] arm64: zynqmp: Add data cells to access efuse Michael Tretter
@ 2019-10-23 12:30   ` Michal Simek
  0 siblings, 0 replies; 18+ messages in thread
From: Michal Simek @ 2019-10-23 12:30 UTC (permalink / raw)
  To: Michael Tretter, robh+dt, mark.rutland, michal.simek, devicetree
  Cc: linux-arm-kernel, Durga Challa

On 18. 10. 19 18:07, Michael Tretter wrote:
> From: Durga Challa <vnsl.durga.challa@xilinx.com>
> 
> This patch adds data cells under nvmem node to
> read efuse memory
> 
> Signed-off-by: Durga Challa <vnsl.durga.challa@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> ---
>  arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 48 ++++++++++++++++++++++++++
>  1 file changed, 48 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
> index 3c731e73903a..73d26177eb96 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
> @@ -128,6 +128,54 @@
>  				soc_revision: soc_revision@0 {
>  					reg = <0x0 0x4>;
>  				};
> +				efuse_dna: efuse_dna@c {
> +					reg = <0xc 0xc>;
> +				};
> +				efuse_usr0: efuse_usr0@20 {
> +					reg = <0x20 0x4>;
> +				};
> +				efuse_usr1: efuse_usr1@24 {
> +					reg = <0x24 0x4>;
> +				};
> +				efuse_usr2: efuse_usr2@28 {
> +					reg = <0x28 0x4>;
> +				};
> +				efuse_usr3: efuse_usr3@2c {
> +					reg = <0x2c 0x4>;
> +				};
> +				efuse_usr4: efuse_usr4@30 {
> +					reg = <0x30 0x4>;
> +				};
> +				efuse_usr5: efuse_usr5@34 {
> +					reg = <0x34 0x4>;
> +				};
> +				efuse_usr6: efuse_usr6@38 {
> +					reg = <0x38 0x4>;
> +				};
> +				efuse_usr7: efuse_usr7@3c {
> +					reg = <0x3c 0x4>;
> +				};
> +				efuse_miscusr: efuse_miscusr@40 {
> +					reg = <0x40 0x4>;
> +				};
> +				efuse_chash: efuse_chash@50 {
> +					reg = <0x50 0x4>;
> +				};
> +				efuse_pufmisc: efuse_pufmisc@54 {
> +					reg = <0x54 0x4>;
> +				};
> +				efuse_sec: efuse_sec@58 {
> +					reg = <0x58 0x4>;
> +				};
> +				efuse_spkid: efuse_spkid@5c {
> +					reg = <0x5c 0x4>;
> +				};
> +				efuse_ppk0hash: efuse_ppk0hash@a0 {
> +					reg = <0xa0 0x30>;
> +				};
> +				efuse_ppk1hash: efuse_ppk1hash@d0 {
> +					reg = <0xd0 0x30>;
> +				};
>  			};
>  
>  			zynqmp_pcap: pcap {
> 

This code is not in mainline yet that's why I am ignoring this patch.

Thanks,
Michal


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

* Re: [PATCH 1/5] arm64: zynqmp: Add firmware DT node
  2019-10-18 16:07 ` [PATCH 1/5] arm64: zynqmp: Add firmware DT node Michael Tretter
@ 2019-12-08 22:38   ` Guenter Roeck
  2019-12-09  6:42     ` Michal Simek
  0 siblings, 1 reply; 18+ messages in thread
From: Guenter Roeck @ 2019-12-08 22:38 UTC (permalink / raw)
  To: Michael Tretter
  Cc: robh+dt, mark.rutland, michal.simek, devicetree, Rajan Vaja,
	Rajan Vaja, linux-arm-kernel, qemu-devel

On Fri, Oct 18, 2019 at 06:07:31PM +0200, Michael Tretter wrote:
> From: Rajan Vaja <rajan.vaja@xilinx.com>
> 
> Add firmware DT node in ZynqMP device tree. This node
> uses bindings as per new firmware interface driver.
> 
> Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>

With this patch applied in the mainline kernel, the qemu xlnx-zcu102
emulation crashes (see below). Any idea what it might take to get
qemu back to working ?

Thanks,
Guenter

---
[   30.719268] ------------[ cut here ]------------
[   30.719403] kernel BUG at arch/arm64/kernel/traps.c:406!
[   30.719971] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[   30.720358] Modules linked in:
[   30.720741] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.4.0-13331-g9455d25f4e3b #1
[   30.720852] Hardware name: ZynqMP ZCU102 Rev1.0 (DT)
[   30.721157] pstate: 00000005 (nzcv daif -PAN -UAO)
[   30.721261] pc : do_undefinstr+0x2f4/0x318
[   30.721336] lr : do_undefinstr+0x1fc/0x318
[   30.721410] sp : ffff80001003b930
[   30.721486] x29: ffff80001003b930 x28: ffff00007d178040
[   30.721597] x27: 0000000000000000 x26: ffff8000117d0514
[   30.721683] x25: ffff8000118c90d0 x24: 0000000000000000
[   30.721769] x23: 0000000040000005 x22: 00000000d4000003
[   30.721854] x21: ffff800011e1c850 x20: ffff80001003b990
[   30.721940] x19: ffff800011e0fa08 x18: 0000000000000001
[   30.722025] x17: ffff800010c0f1d8 x16: ffff800010c11fb8
[   30.722111] x15: ffffffffffffffff x14: ffffffffffffffff
[   30.722196] x13: 0000000000000018 x12: 0101010101010101
[   30.722281] x11: 0000000000000000 x10: 00000000628e21fa
[   30.722384] x9 : ffff00007d178858 x8 : ffff00007d178880
[   30.722471] x7 : ffff80001003b8b0 x6 : 0000000000000001
[   30.722560] x5 : 0000000000000001 x4 : 0000000000000001
[   30.722646] x3 : 0000000000000000 x2 : 00000000000174b1
[   30.722730] x1 : ffff00007d178040 x0 : 0000000040000005
[   30.722913] Call trace:
[   30.722993]  do_undefinstr+0x2f4/0x318
[   30.723070]  el1_sync_handler+0xb0/0x108
[   30.723138]  el1_sync+0x7c/0x100
[   30.723201]  __arm_smccc_smc+0x0/0x2c
[   30.723272]  zynqmp_pm_get_api_version.part.1+0x40/0x68
[   30.723352]  zynqmp_firmware_probe+0xbc/0x298

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

* Re: [PATCH 1/5] arm64: zynqmp: Add firmware DT node
  2019-12-08 22:38   ` Guenter Roeck
@ 2019-12-09  6:42     ` Michal Simek
  2019-12-09  7:19       ` Guenter Roeck
  0 siblings, 1 reply; 18+ messages in thread
From: Michal Simek @ 2019-12-09  6:42 UTC (permalink / raw)
  To: Guenter Roeck, Michael Tretter, Edgar Iglesias
  Cc: robh+dt, mark.rutland, michal.simek, devicetree, Rajan Vaja,
	Rajan Vaja, linux-arm-kernel, qemu-devel

Hi, +Edgar


On 08. 12. 19 23:38, Guenter Roeck wrote:
> On Fri, Oct 18, 2019 at 06:07:31PM +0200, Michael Tretter wrote:
>> From: Rajan Vaja <rajan.vaja@xilinx.com>
>>
>> Add firmware DT node in ZynqMP device tree. This node
>> uses bindings as per new firmware interface driver.
>>
>> Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> 
> With this patch applied in the mainline kernel, the qemu xlnx-zcu102
> emulation crashes (see below). Any idea what it might take to get
> qemu back to working ?

Driver talks through ATF to PMU unit(microblaze). I don't think A53+MB
concept is working with mainline qemu. But crash is too hard. It should
be no response from PMU and then this panic.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/xilinx/zynqmp.c?h=v5.5-rc1#n728

Edgar: can you please comment this?

Thanks,
Michal

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

* Re: [PATCH 1/5] arm64: zynqmp: Add firmware DT node
  2019-12-09  6:42     ` Michal Simek
@ 2019-12-09  7:19       ` Guenter Roeck
  2019-12-09  7:48         ` Edgar E. Iglesias
  2019-12-09  8:36         ` Michal Simek
  0 siblings, 2 replies; 18+ messages in thread
From: Guenter Roeck @ 2019-12-09  7:19 UTC (permalink / raw)
  To: Michal Simek, Michael Tretter, Edgar Iglesias
  Cc: robh+dt, mark.rutland, devicetree, Rajan Vaja, Rajan Vaja,
	linux-arm-kernel, qemu-devel

On 12/8/19 10:42 PM, Michal Simek wrote:
> Hi, +Edgar
> 
> 
> On 08. 12. 19 23:38, Guenter Roeck wrote:
>> On Fri, Oct 18, 2019 at 06:07:31PM +0200, Michael Tretter wrote:
>>> From: Rajan Vaja <rajan.vaja@xilinx.com>
>>>
>>> Add firmware DT node in ZynqMP device tree. This node
>>> uses bindings as per new firmware interface driver.
>>>
>>> Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
>>
>> With this patch applied in the mainline kernel, the qemu xlnx-zcu102
>> emulation crashes (see below). Any idea what it might take to get
>> qemu back to working ?
> 
> Driver talks through ATF to PMU unit(microblaze). I don't think A53+MB
> concept is working with mainline qemu. But crash is too hard. It should
> be no response from PMU and then this panic.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/xilinx/zynqmp.c?h=v5.5-rc1#n728
> 

Isn't that a bit harsh too ? Normally one would print an error message
and abort driver instantiation.

It sounds like you are saying that qemu's xlnx-zcu102 emulation is
no longer supported and expected to crash the kernel. Is this a
correct assumption ? If so, I'll drop it from my list of tests.

Thanks,
Guenter

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

* Re: [PATCH 1/5] arm64: zynqmp: Add firmware DT node
  2019-12-09  7:19       ` Guenter Roeck
@ 2019-12-09  7:48         ` Edgar E. Iglesias
  2019-12-09  8:33           ` Michal Simek
  2019-12-09 14:32           ` Guenter Roeck
  2019-12-09  8:36         ` Michal Simek
  1 sibling, 2 replies; 18+ messages in thread
From: Edgar E. Iglesias @ 2019-12-09  7:48 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Michal Simek, Michael Tretter, Edgar Iglesias, robh+dt,
	mark.rutland, devicetree, Rajan Vaja, Rajan Vaja,
	linux-arm-kernel, qemu-devel

On Sun, Dec 08, 2019 at 11:19:33PM -0800, Guenter Roeck wrote:
> On 12/8/19 10:42 PM, Michal Simek wrote:
> > Hi, +Edgar
> > 
> > 
> > On 08. 12. 19 23:38, Guenter Roeck wrote:
> > > On Fri, Oct 18, 2019 at 06:07:31PM +0200, Michael Tretter wrote:
> > > > From: Rajan Vaja <rajan.vaja@xilinx.com>
> > > > 
> > > > Add firmware DT node in ZynqMP device tree. This node
> > > > uses bindings as per new firmware interface driver.
> > > > 
> > > > Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
> > > > Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> > > > Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> > > 
> > > With this patch applied in the mainline kernel, the qemu xlnx-zcu102
> > > emulation crashes (see below). Any idea what it might take to get
> > > qemu back to working ?
> > 
> > Driver talks through ATF to PMU unit(microblaze). I don't think A53+MB
> > concept is working with mainline qemu. But crash is too hard. It should

Yes, QEMU doesn't support the Cortex-A53s along with the PMU MicroBlaze.

My workaround when using upstream QEMU is a modified DT without the PMU firmware
and with fixed-clock nodes.


> > be no response from PMU and then this panic.
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/xilinx/zynqmp.c?h=v5.5-rc1#n728
> > 
> 
> Isn't that a bit harsh too ? Normally one would print an error message
> and abort driver instantiation.

I agree, it would be nice if ATF & kernel drivers would somehow handle
this more gracefully.

Cheers,
Edgar


> 
> It sounds like you are saying that qemu's xlnx-zcu102 emulation is
> no longer supported and expected to crash the kernel. Is this a
> correct assumption ? If so, I'll drop it from my list of tests.
> 
> Thanks,
> Guenter

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

* Re: [PATCH 1/5] arm64: zynqmp: Add firmware DT node
  2019-12-09  7:48         ` Edgar E. Iglesias
@ 2019-12-09  8:33           ` Michal Simek
  2019-12-09 14:32           ` Guenter Roeck
  1 sibling, 0 replies; 18+ messages in thread
From: Michal Simek @ 2019-12-09  8:33 UTC (permalink / raw)
  To: Edgar E. Iglesias, Guenter Roeck
  Cc: Michal Simek, Michael Tretter, Edgar Iglesias, robh+dt,
	mark.rutland, devicetree, Rajan Vaja, Rajan Vaja,
	linux-arm-kernel, qemu-devel

On 09. 12. 19 8:48, Edgar E. Iglesias wrote:
> On Sun, Dec 08, 2019 at 11:19:33PM -0800, Guenter Roeck wrote:
>> On 12/8/19 10:42 PM, Michal Simek wrote:
>>> Hi, +Edgar
>>>
>>>
>>> On 08. 12. 19 23:38, Guenter Roeck wrote:
>>>> On Fri, Oct 18, 2019 at 06:07:31PM +0200, Michael Tretter wrote:
>>>>> From: Rajan Vaja <rajan.vaja@xilinx.com>
>>>>>
>>>>> Add firmware DT node in ZynqMP device tree. This node
>>>>> uses bindings as per new firmware interface driver.
>>>>>
>>>>> Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
>>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>>> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
>>>>
>>>> With this patch applied in the mainline kernel, the qemu xlnx-zcu102
>>>> emulation crashes (see below). Any idea what it might take to get
>>>> qemu back to working ?
>>>
>>> Driver talks through ATF to PMU unit(microblaze). I don't think A53+MB
>>> concept is working with mainline qemu. But crash is too hard. It should
> 
> Yes, QEMU doesn't support the Cortex-A53s along with the PMU MicroBlaze.
> 
> My workaround when using upstream QEMU is a modified DT without the PMU firmware
> and with fixed-clock nodes.

IIRC you said that there is still discussion how to upstream this.
Fixed clock should work for u-boot too. But SPL reads that registers
directly. Are you implementing them with any default values?

> 
> 
>>> be no response from PMU and then this panic.
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/xilinx/zynqmp.c?h=v5.5-rc1#n728
>>>
>>
>> Isn't that a bit harsh too ? Normally one would print an error message
>> and abort driver instantiation.
> 
> I agree, it would be nice if ATF & kernel drivers would somehow handle
> this more gracefully.

Rajan: can you please take a look at it?

Thanks,
Michal

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

* Re: [PATCH 1/5] arm64: zynqmp: Add firmware DT node
  2019-12-09  7:19       ` Guenter Roeck
  2019-12-09  7:48         ` Edgar E. Iglesias
@ 2019-12-09  8:36         ` Michal Simek
  1 sibling, 0 replies; 18+ messages in thread
From: Michal Simek @ 2019-12-09  8:36 UTC (permalink / raw)
  To: Guenter Roeck, Michal Simek, Michael Tretter, Edgar Iglesias
  Cc: robh+dt, mark.rutland, devicetree, Rajan Vaja, Rajan Vaja,
	linux-arm-kernel, qemu-devel

On 09. 12. 19 8:19, Guenter Roeck wrote:
> On 12/8/19 10:42 PM, Michal Simek wrote:
>> Hi, +Edgar
>>
>>
>> On 08. 12. 19 23:38, Guenter Roeck wrote:
>>> On Fri, Oct 18, 2019 at 06:07:31PM +0200, Michael Tretter wrote:
>>>> From: Rajan Vaja <rajan.vaja@xilinx.com>
>>>>
>>>> Add firmware DT node in ZynqMP device tree. This node
>>>> uses bindings as per new firmware interface driver.
>>>>
>>>> Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
>>>
>>> With this patch applied in the mainline kernel, the qemu xlnx-zcu102
>>> emulation crashes (see below). Any idea what it might take to get
>>> qemu back to working ?
>>
>> Driver talks through ATF to PMU unit(microblaze). I don't think A53+MB
>> concept is working with mainline qemu. But crash is too hard. It should
>> be no response from PMU and then this panic.
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/xilinx/zynqmp.c?h=v5.5-rc1#n728
>>
>>
> 
> Isn't that a bit harsh too ? Normally one would print an error message
> and abort driver instantiation.

Using different DT as Edgar mentioned should work but the question is
how to properly wire it up.
Edgar: What about "simply" generate that DT by qemu model based on what
implementation is available?


> 
> It sounds like you are saying that qemu's xlnx-zcu102 emulation is
> no longer supported and expected to crash the kernel. Is this a
> correct assumption ? If so, I'll drop it from my list of tests.

Let's discuss this first. I definitely appreciate that you run these tests.

Thanks,
Michal


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

* Re: [PATCH 1/5] arm64: zynqmp: Add firmware DT node
  2019-12-09  7:48         ` Edgar E. Iglesias
  2019-12-09  8:33           ` Michal Simek
@ 2019-12-09 14:32           ` Guenter Roeck
  2019-12-09 15:02             ` Michal Simek
  1 sibling, 1 reply; 18+ messages in thread
From: Guenter Roeck @ 2019-12-09 14:32 UTC (permalink / raw)
  To: Edgar E. Iglesias
  Cc: Michal Simek, Michael Tretter, Edgar Iglesias, robh+dt,
	mark.rutland, devicetree, Rajan Vaja, Rajan Vaja,
	linux-arm-kernel, qemu-devel

On 12/8/19 11:48 PM, Edgar E. Iglesias wrote:
> On Sun, Dec 08, 2019 at 11:19:33PM -0800, Guenter Roeck wrote:
>> On 12/8/19 10:42 PM, Michal Simek wrote:
>>> Hi, +Edgar
>>>
>>>
>>> On 08. 12. 19 23:38, Guenter Roeck wrote:
>>>> On Fri, Oct 18, 2019 at 06:07:31PM +0200, Michael Tretter wrote:
>>>>> From: Rajan Vaja <rajan.vaja@xilinx.com>
>>>>>
>>>>> Add firmware DT node in ZynqMP device tree. This node
>>>>> uses bindings as per new firmware interface driver.
>>>>>
>>>>> Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
>>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>>> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
>>>>
>>>> With this patch applied in the mainline kernel, the qemu xlnx-zcu102
>>>> emulation crashes (see below). Any idea what it might take to get
>>>> qemu back to working ?
>>>
>>> Driver talks through ATF to PMU unit(microblaze). I don't think A53+MB
>>> concept is working with mainline qemu. But crash is too hard. It should
> 
> Yes, QEMU doesn't support the Cortex-A53s along with the PMU MicroBlaze.
> 
> My workaround when using upstream QEMU is a modified DT without the PMU firmware
> and with fixed-clock nodes.
> 

I can't do that for my boot tests. Normally I would just disable ZYNQMP_FIRMWARE,
but that is hard enabled with ARCH_ZYNQMP. I'll have to drop those tests,
unfortunately, if the firmware driver is considered mandatory.

Guenter

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

* Re: [PATCH 1/5] arm64: zynqmp: Add firmware DT node
  2019-12-09 14:32           ` Guenter Roeck
@ 2019-12-09 15:02             ` Michal Simek
  2019-12-15  5:28               ` Guenter Roeck
  0 siblings, 1 reply; 18+ messages in thread
From: Michal Simek @ 2019-12-09 15:02 UTC (permalink / raw)
  To: Guenter Roeck, Edgar E. Iglesias
  Cc: Michal Simek, Michael Tretter, Edgar Iglesias, robh+dt,
	mark.rutland, devicetree, Rajan Vaja, Rajan Vaja,
	linux-arm-kernel, qemu-devel

On 09. 12. 19 15:32, Guenter Roeck wrote:
> On 12/8/19 11:48 PM, Edgar E. Iglesias wrote:
>> On Sun, Dec 08, 2019 at 11:19:33PM -0800, Guenter Roeck wrote:
>>> On 12/8/19 10:42 PM, Michal Simek wrote:
>>>> Hi, +Edgar
>>>>
>>>>
>>>> On 08. 12. 19 23:38, Guenter Roeck wrote:
>>>>> On Fri, Oct 18, 2019 at 06:07:31PM +0200, Michael Tretter wrote:
>>>>>> From: Rajan Vaja <rajan.vaja@xilinx.com>
>>>>>>
>>>>>> Add firmware DT node in ZynqMP device tree. This node
>>>>>> uses bindings as per new firmware interface driver.
>>>>>>
>>>>>> Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
>>>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>>>> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
>>>>>
>>>>> With this patch applied in the mainline kernel, the qemu xlnx-zcu102
>>>>> emulation crashes (see below). Any idea what it might take to get
>>>>> qemu back to working ?
>>>>
>>>> Driver talks through ATF to PMU unit(microblaze). I don't think A53+MB
>>>> concept is working with mainline qemu. But crash is too hard. It should
>>
>> Yes, QEMU doesn't support the Cortex-A53s along with the PMU MicroBlaze.
>>
>> My workaround when using upstream QEMU is a modified DT without the
>> PMU firmware
>> and with fixed-clock nodes.
>>
> 
> I can't do that for my boot tests. Normally I would just disable
> ZYNQMP_FIRMWARE,
> but that is hard enabled with ARCH_ZYNQMP. I'll have to drop those tests,
> unfortunately, if the firmware driver is considered mandatory.

We can make it optional.
Rajan: please send a patch for it.

M


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

* Re: [PATCH 1/5] arm64: zynqmp: Add firmware DT node
  2019-12-09 15:02             ` Michal Simek
@ 2019-12-15  5:28               ` Guenter Roeck
  2019-12-16  6:28                 ` Michal Simek
  0 siblings, 1 reply; 18+ messages in thread
From: Guenter Roeck @ 2019-12-15  5:28 UTC (permalink / raw)
  To: Michal Simek, Edgar E. Iglesias
  Cc: Michael Tretter, Edgar Iglesias, robh+dt, mark.rutland,
	devicetree, Rajan Vaja, Rajan Vaja, linux-arm-kernel, qemu-devel

On 12/9/19 7:02 AM, Michal Simek wrote:
> On 09. 12. 19 15:32, Guenter Roeck wrote:
>> On 12/8/19 11:48 PM, Edgar E. Iglesias wrote:
>>> On Sun, Dec 08, 2019 at 11:19:33PM -0800, Guenter Roeck wrote:
>>>> On 12/8/19 10:42 PM, Michal Simek wrote:
>>>>> Hi, +Edgar
>>>>>
>>>>>
>>>>> On 08. 12. 19 23:38, Guenter Roeck wrote:
>>>>>> On Fri, Oct 18, 2019 at 06:07:31PM +0200, Michael Tretter wrote:
>>>>>>> From: Rajan Vaja <rajan.vaja@xilinx.com>
>>>>>>>
>>>>>>> Add firmware DT node in ZynqMP device tree. This node
>>>>>>> uses bindings as per new firmware interface driver.
>>>>>>>
>>>>>>> Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
>>>>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>>>>> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
>>>>>>
>>>>>> With this patch applied in the mainline kernel, the qemu xlnx-zcu102
>>>>>> emulation crashes (see below). Any idea what it might take to get
>>>>>> qemu back to working ?
>>>>>
>>>>> Driver talks through ATF to PMU unit(microblaze). I don't think A53+MB
>>>>> concept is working with mainline qemu. But crash is too hard. It should
>>>
>>> Yes, QEMU doesn't support the Cortex-A53s along with the PMU MicroBlaze.
>>>
>>> My workaround when using upstream QEMU is a modified DT without the
>>> PMU firmware
>>> and with fixed-clock nodes.
>>>
>>
>> I can't do that for my boot tests. Normally I would just disable
>> ZYNQMP_FIRMWARE,
>> but that is hard enabled with ARCH_ZYNQMP. I'll have to drop those tests,
>> unfortunately, if the firmware driver is considered mandatory.
> 
> We can make it optional.
> Rajan: please send a patch for it.
> 

I'll disable the related boot tests for now. If/when this is fixed, let me know,
and I'll re-enable it.

Guenter

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

* Re: [PATCH 1/5] arm64: zynqmp: Add firmware DT node
  2019-12-15  5:28               ` Guenter Roeck
@ 2019-12-16  6:28                 ` Michal Simek
  0 siblings, 0 replies; 18+ messages in thread
From: Michal Simek @ 2019-12-16  6:28 UTC (permalink / raw)
  To: Guenter Roeck, Michal Simek, Edgar E. Iglesias
  Cc: Michael Tretter, Edgar Iglesias, robh+dt, mark.rutland,
	devicetree, Rajan Vaja, Rajan Vaja, linux-arm-kernel, qemu-devel

On 15. 12. 19 6:28, Guenter Roeck wrote:
> On 12/9/19 7:02 AM, Michal Simek wrote:
>> On 09. 12. 19 15:32, Guenter Roeck wrote:
>>> On 12/8/19 11:48 PM, Edgar E. Iglesias wrote:
>>>> On Sun, Dec 08, 2019 at 11:19:33PM -0800, Guenter Roeck wrote:
>>>>> On 12/8/19 10:42 PM, Michal Simek wrote:
>>>>>> Hi, +Edgar
>>>>>>
>>>>>>
>>>>>> On 08. 12. 19 23:38, Guenter Roeck wrote:
>>>>>>> On Fri, Oct 18, 2019 at 06:07:31PM +0200, Michael Tretter wrote:
>>>>>>>> From: Rajan Vaja <rajan.vaja@xilinx.com>
>>>>>>>>
>>>>>>>> Add firmware DT node in ZynqMP device tree. This node
>>>>>>>> uses bindings as per new firmware interface driver.
>>>>>>>>
>>>>>>>> Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
>>>>>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>>>>>> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
>>>>>>>
>>>>>>> With this patch applied in the mainline kernel, the qemu xlnx-zcu102
>>>>>>> emulation crashes (see below). Any idea what it might take to get
>>>>>>> qemu back to working ?
>>>>>>
>>>>>> Driver talks through ATF to PMU unit(microblaze). I don't think
>>>>>> A53+MB
>>>>>> concept is working with mainline qemu. But crash is too hard. It
>>>>>> should
>>>>
>>>> Yes, QEMU doesn't support the Cortex-A53s along with the PMU
>>>> MicroBlaze.
>>>>
>>>> My workaround when using upstream QEMU is a modified DT without the
>>>> PMU firmware
>>>> and with fixed-clock nodes.
>>>>
>>>
>>> I can't do that for my boot tests. Normally I would just disable
>>> ZYNQMP_FIRMWARE,
>>> but that is hard enabled with ARCH_ZYNQMP. I'll have to drop those
>>> tests,
>>> unfortunately, if the firmware driver is considered mandatory.
>>
>> We can make it optional.
>> Rajan: please send a patch for it.
>>
> 
> I'll disable the related boot tests for now. If/when this is fixed, let
> me know,
> and I'll re-enable it.

ok. Sure.

Thanks,
Michal


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

end of thread, other threads:[~2019-12-16  6:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 16:07 [PATCH 0/5] arm64: zynqmp: add firmware device tree node Michael Tretter
2019-10-18 16:07 ` [PATCH 1/5] arm64: zynqmp: Add firmware DT node Michael Tretter
2019-12-08 22:38   ` Guenter Roeck
2019-12-09  6:42     ` Michal Simek
2019-12-09  7:19       ` Guenter Roeck
2019-12-09  7:48         ` Edgar E. Iglesias
2019-12-09  8:33           ` Michal Simek
2019-12-09 14:32           ` Guenter Roeck
2019-12-09 15:02             ` Michal Simek
2019-12-15  5:28               ` Guenter Roeck
2019-12-16  6:28                 ` Michal Simek
2019-12-09  8:36         ` Michal Simek
2019-10-18 16:07 ` [PATCH 2/5] arm64: zynqmp: Add support for zynqmp fpga manager Michael Tretter
2019-10-18 16:07 ` [PATCH 3/5] arm64: zynqmp: Label whole PL part as fpga_full region Michael Tretter
2019-10-18 16:07 ` [PATCH 4/5] arm64: zynqmp: Add support for zynqmp nvmem firmware driver Michael Tretter
2019-10-18 16:07 ` [PATCH 5/5] arm64: zynqmp: Add data cells to access efuse Michael Tretter
2019-10-23 12:30   ` Michal Simek
2019-10-23 12:30 ` [PATCH 0/5] arm64: zynqmp: add firmware device tree node Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).