Re: [PATCH 02/12] powerpc: wiiu: device tree

2022-03-02 Thread Ash Logan

Hi Rob,
Thanks for the review.

On 3/3/22 00:36, Rob Herring wrote:

On Tue, Mar 1, 2022 at 10:44 PM Ash Logan  wrote:


Add a device tree source file for the Nintendo Wii U video game console.


Test this with 'make W=1 dtbs_checks'.


Does make W=1 ARCH=powerpc wiiu_defconfig dtbs_check seem reasonable? I 
ran it, and saw LINT/CHKDT/UPD/SCHEMA/COPY steps, but if I put garbage 
in the .dts it gives no warnings.




Signed-off-by: Ash Logan 
Co-developed-by: Roberto Van Eeden 
Signed-off-by: Roberto Van Eeden 
Co-developed-by: Emmanuel Gil Peyrot 
Signed-off-by: Emmanuel Gil Peyrot 
---
  arch/powerpc/boot/dts/wiiu.dts | 327 +
  1 file changed, 327 insertions(+)
  create mode 100644 arch/powerpc/boot/dts/wiiu.dts

diff --git a/arch/powerpc/boot/dts/wiiu.dts b/arch/powerpc/boot/dts/wiiu.dts
new file mode 100644
index ..aaf264963f61
--- /dev/null
+++ b/arch/powerpc/boot/dts/wiiu.dts
@@ -0,0 +1,327 @@
+// SPDX-License-Identifier: GPL-2.0


What about non-GPL environments?


The other powerpc dts files are all GPL-2.0(-or-later), is there a 
preferred license for devicetrees?



+/*
+ * Nintendo Wii U Device Tree Source
+ *
+ * Copyright (C) 2022 The linux-wiiu Team
+ */
+
+/dts-v1/;
+#include 
+#include 
+
+/ {
+   model = "nintendo,wiiu";
+   compatible = "nintendo,wiiu";
+
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   chosen {
+   bootargs = "root=/dev/sda1 rootwait";
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0x 0x0200/* MEM1 - 32MiB */
+  0x0800 0x0030/* MEM0 - 3MiB  */
+  0x1000 0x8000>;  /* MEM2 - 2GiB  */
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   /* TODO: Add SMP */
+   PowerPC,espresso@0 {
+   device_type = "cpu";
+   reg = <0>;
+   clock-frequency = <1243125000>; /* 1.243125GHz 
*/
+   bus-frequency = <248625000>;/* 248.625MHz 
core-to-bus 5x */
+   timebase-frequency = <62156250>;/* 1/4 of the 
bus clock */
+   i-cache-size = <32768>; /* 32K icache */
+   i-cache-line-size = <32>;
+   i-cache-block-size = <32>;
+   i-cache-sets = <128>;
+   d-cache-size = <32768>; /* 32K dcache */
+   d-cache-line-size = <32>;
+   d-cache-block-size = <32>;
+   d-cache-sets = <128>;
+   next-level-cache = <_0>;
+   L2_0:l2-cache {
+   compatible = "cache";
+   cache-level = <2>;
+   cache-unified;
+   cache-size = <0x8>; /* 512KB L2 */
+   cache-line-size = <64>;
+   cache-block-size = <32>;
+   cache-sets = <2048>;
+   };
+   };
+   };
+
+   latte {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "nintendo,latte";
+   ranges = <0x0c00 0x0c00 0x0040  /* 
Espresso-only registers */
+ 0x0d00 0x0d00 0x0020  /* Latte AHB 
deivces */
+ 0x0d80 0x0d80 0x0080>;/* Latte SoC 
registers */
+
+   gpu7@c20 {


gpu@...


+   compatible = "nintendo,latte-gpu7";
+   reg = <0x0c20 0x8>;
+   interrupts = <2>;
+   interrupt-parent = <_pic>;
+   };
+
+   espresso_pic: pic@c78 {
+   #interrupt-cells = <1>;
+   interrupt-controller;
+
+   compatible = "nintendo,espresso-pic";
+   reg = <0x0c78 0x18>;
+   };
+
+   latte_dsp: dsp@c005000 {
+   compatible = "nintendo,latte-dsp";
+   reg = <0x0c005000 0x200>;
+   };
+
+   ehci_0: usb@d04 {
+   compatible = "nintendo,latte-usb-ehci", "usb-ehci";
+   reg = <0x0d04 0x100>;
+   interrupts = <4>;
+   interrupt-parent = <_pic>;
+   big-endian-regs;
+   };
+
+   ohci_0_0: usb@d05 {
+   compatible = "nintendo,latte-usb-ohci";
+   reg = <0x0d05 0x100>;
+   interrupts = <5>;
+   interrupt-parent = <_pic>;
+
+   big-endian-regs;
+   };
+
+   

Re: [PATCH 02/12] powerpc: wiiu: device tree

2022-03-02 Thread Rob Herring
On Tue, Mar 1, 2022 at 10:44 PM Ash Logan  wrote:
>
> Add a device tree source file for the Nintendo Wii U video game console.

Test this with 'make W=1 dtbs_checks'.

>
> Signed-off-by: Ash Logan 
> Co-developed-by: Roberto Van Eeden 
> Signed-off-by: Roberto Van Eeden 
> Co-developed-by: Emmanuel Gil Peyrot 
> Signed-off-by: Emmanuel Gil Peyrot 
> ---
>  arch/powerpc/boot/dts/wiiu.dts | 327 +
>  1 file changed, 327 insertions(+)
>  create mode 100644 arch/powerpc/boot/dts/wiiu.dts
>
> diff --git a/arch/powerpc/boot/dts/wiiu.dts b/arch/powerpc/boot/dts/wiiu.dts
> new file mode 100644
> index ..aaf264963f61
> --- /dev/null
> +++ b/arch/powerpc/boot/dts/wiiu.dts
> @@ -0,0 +1,327 @@
> +// SPDX-License-Identifier: GPL-2.0

What about non-GPL environments?

> +/*
> + * Nintendo Wii U Device Tree Source
> + *
> + * Copyright (C) 2022 The linux-wiiu Team
> + */
> +
> +/dts-v1/;
> +#include 
> +#include 
> +
> +/ {
> +   model = "nintendo,wiiu";
> +   compatible = "nintendo,wiiu";
> +
> +   #address-cells = <1>;
> +   #size-cells = <1>;
> +
> +   chosen {
> +   bootargs = "root=/dev/sda1 rootwait";
> +   };
> +
> +   memory {
> +   device_type = "memory";
> +   reg = <0x 0x0200/* MEM1 - 32MiB */
> +  0x0800 0x0030/* MEM0 - 3MiB  */
> +  0x1000 0x8000>;  /* MEM2 - 2GiB  */
> +   };
> +
> +   cpus {
> +   #address-cells = <1>;
> +   #size-cells = <0>;
> +
> +   /* TODO: Add SMP */
> +   PowerPC,espresso@0 {
> +   device_type = "cpu";
> +   reg = <0>;
> +   clock-frequency = <1243125000>; /* 
> 1.243125GHz */
> +   bus-frequency = <248625000>;/* 248.625MHz 
> core-to-bus 5x */
> +   timebase-frequency = <62156250>;/* 1/4 of the 
> bus clock */
> +   i-cache-size = <32768>; /* 32K icache */
> +   i-cache-line-size = <32>;
> +   i-cache-block-size = <32>;
> +   i-cache-sets = <128>;
> +   d-cache-size = <32768>; /* 32K dcache */
> +   d-cache-line-size = <32>;
> +   d-cache-block-size = <32>;
> +   d-cache-sets = <128>;
> +   next-level-cache = <_0>;
> +   L2_0:l2-cache {
> +   compatible = "cache";
> +   cache-level = <2>;
> +   cache-unified;
> +   cache-size = <0x8>; /* 512KB L2 */
> +   cache-line-size = <64>;
> +   cache-block-size = <32>;
> +   cache-sets = <2048>;
> +   };
> +   };
> +   };
> +
> +   latte {
> +   #address-cells = <1>;
> +   #size-cells = <1>;
> +   compatible = "nintendo,latte";
> +   ranges = <0x0c00 0x0c00 0x0040  /* 
> Espresso-only registers */
> + 0x0d00 0x0d00 0x0020  /* Latte AHB 
> deivces */
> + 0x0d80 0x0d80 0x0080>;/* Latte SoC 
> registers */
> +
> +   gpu7@c20 {

gpu@...

> +   compatible = "nintendo,latte-gpu7";
> +   reg = <0x0c20 0x8>;
> +   interrupts = <2>;
> +   interrupt-parent = <_pic>;
> +   };
> +
> +   espresso_pic: pic@c78 {
> +   #interrupt-cells = <1>;
> +   interrupt-controller;
> +
> +   compatible = "nintendo,espresso-pic";
> +   reg = <0x0c78 0x18>;
> +   };
> +
> +   latte_dsp: dsp@c005000 {
> +   compatible = "nintendo,latte-dsp";
> +   reg = <0x0c005000 0x200>;
> +   };
> +
> +   ehci_0: usb@d04 {
> +   compatible = "nintendo,latte-usb-ehci", "usb-ehci";
> +   reg = <0x0d04 0x100>;
> +   interrupts = <4>;
> +   interrupt-parent = <_pic>;
> +   big-endian-regs;
> +   };
> +
> +   ohci_0_0: usb@d05 {
> +   compatible = "nintendo,latte-usb-ohci";
> +   reg = <0x0d05 0x100>;
> +   interrupts = <5>;
> +   interrupt-parent = <_pic>;
> +
> +   big-endian-regs;
> +   };
> +
> +   ohci_0_1: usb@d06 {
> +   compatible = "nintendo,latte-usb-ohci";
> +  

[PATCH 02/12] powerpc: wiiu: device tree

2022-03-01 Thread Ash Logan
Add a device tree source file for the Nintendo Wii U video game console.

Signed-off-by: Ash Logan 
Co-developed-by: Roberto Van Eeden 
Signed-off-by: Roberto Van Eeden 
Co-developed-by: Emmanuel Gil Peyrot 
Signed-off-by: Emmanuel Gil Peyrot 
---
 arch/powerpc/boot/dts/wiiu.dts | 327 +
 1 file changed, 327 insertions(+)
 create mode 100644 arch/powerpc/boot/dts/wiiu.dts

diff --git a/arch/powerpc/boot/dts/wiiu.dts b/arch/powerpc/boot/dts/wiiu.dts
new file mode 100644
index ..aaf264963f61
--- /dev/null
+++ b/arch/powerpc/boot/dts/wiiu.dts
@@ -0,0 +1,327 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Nintendo Wii U Device Tree Source
+ *
+ * Copyright (C) 2022 The linux-wiiu Team
+ */
+
+/dts-v1/;
+#include 
+#include 
+
+/ {
+   model = "nintendo,wiiu";
+   compatible = "nintendo,wiiu";
+
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   chosen {
+   bootargs = "root=/dev/sda1 rootwait";
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0x 0x0200/* MEM1 - 32MiB */
+  0x0800 0x0030/* MEM0 - 3MiB  */
+  0x1000 0x8000>;  /* MEM2 - 2GiB  */
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   /* TODO: Add SMP */
+   PowerPC,espresso@0 {
+   device_type = "cpu";
+   reg = <0>;
+   clock-frequency = <1243125000>; /* 1.243125GHz 
*/
+   bus-frequency = <248625000>;/* 248.625MHz 
core-to-bus 5x */
+   timebase-frequency = <62156250>;/* 1/4 of the 
bus clock */
+   i-cache-size = <32768>; /* 32K icache */
+   i-cache-line-size = <32>;
+   i-cache-block-size = <32>;
+   i-cache-sets = <128>;
+   d-cache-size = <32768>; /* 32K dcache */
+   d-cache-line-size = <32>;
+   d-cache-block-size = <32>;
+   d-cache-sets = <128>;
+   next-level-cache = <_0>;
+   L2_0:l2-cache {
+   compatible = "cache";
+   cache-level = <2>;
+   cache-unified;
+   cache-size = <0x8>; /* 512KB L2 */
+   cache-line-size = <64>;
+   cache-block-size = <32>;
+   cache-sets = <2048>;
+   };
+   };
+   };
+
+   latte {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "nintendo,latte";
+   ranges = <0x0c00 0x0c00 0x0040  /* 
Espresso-only registers */
+ 0x0d00 0x0d00 0x0020  /* Latte AHB 
deivces */
+ 0x0d80 0x0d80 0x0080>;/* Latte SoC 
registers */
+
+   gpu7@c20 {
+   compatible = "nintendo,latte-gpu7";
+   reg = <0x0c20 0x8>;
+   interrupts = <2>;
+   interrupt-parent = <_pic>;
+   };
+
+   espresso_pic: pic@c78 {
+   #interrupt-cells = <1>;
+   interrupt-controller;
+
+   compatible = "nintendo,espresso-pic";
+   reg = <0x0c78 0x18>;
+   };
+
+   latte_dsp: dsp@c005000 {
+   compatible = "nintendo,latte-dsp";
+   reg = <0x0c005000 0x200>;
+   };
+
+   ehci_0: usb@d04 {
+   compatible = "nintendo,latte-usb-ehci", "usb-ehci";
+   reg = <0x0d04 0x100>;
+   interrupts = <4>;
+   interrupt-parent = <_pic>;
+   big-endian-regs;
+   };
+
+   ohci_0_0: usb@d05 {
+   compatible = "nintendo,latte-usb-ohci";
+   reg = <0x0d05 0x100>;
+   interrupts = <5>;
+   interrupt-parent = <_pic>;
+
+   big-endian-regs;
+   };
+
+   ohci_0_1: usb@d06 {
+   compatible = "nintendo,latte-usb-ohci";
+   reg = <0x0d06 0x100>;
+   interrupts = <6>;
+   interrupt-parent = <_pic>;
+
+   big-endian-regs;
+   };
+
+   ehci_1: usb@d12 {
+   compatible = "nintendo,latte-usb-ehci", "usb-ehci";
+   reg = <0x0d12 0x100>;
+   interrupts =