MIPS: ingenic: Initial GCW Zero support
authorPaul Cercueil <paul@crapouillou.net>
Tue, 16 Jan 2018 15:48:04 +0000 (16:48 +0100)
committerJames Hogan <jhogan@kernel.org>
Thu, 18 Jan 2018 22:08:10 +0000 (22:08 +0000)
The GCW Zero (http://www.gcw-zero.com) is a retro-gaming focused
handheld game console, successfully kickstarted in ~2012, running Linux.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Acked-by: Mathieu Malaterre <malat@debian.org>
Acked-by: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Maarten ter Huurne <maarten@treewalker.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/18490/
Signed-off-by: James Hogan <jhogan@kernel.org>
arch/mips/boot/dts/ingenic/Makefile
arch/mips/boot/dts/ingenic/gcw0.dts [new file with mode: 0644]
arch/mips/configs/gcw0_defconfig [new file with mode: 0644]
arch/mips/jz4740/Kconfig

index 6a31759..5b1361a 100644 (file)
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_JZ4740_QI_LB60)   += qi_lb60.dtb
+dtb-$(CONFIG_JZ4770_GCW0)      += gcw0.dtb
 dtb-$(CONFIG_JZ4780_CI20)      += ci20.dtb
 
 obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
diff --git a/arch/mips/boot/dts/ingenic/gcw0.dts b/arch/mips/boot/dts/ingenic/gcw0.dts
new file mode 100644 (file)
index 0000000..35f0291
--- /dev/null
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include "jz4770.dtsi"
+
+/ {
+       compatible = "gcw,zero", "ingenic,jz4770";
+       model = "GCW Zero";
+
+       aliases {
+               serial0 = &uart0;
+               serial1 = &uart1;
+               serial2 = &uart2;
+               serial3 = &uart3;
+       };
+
+       chosen {
+               stdout-path = "serial2:57600n8";
+       };
+
+       board {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               otg_phy: otg-phy {
+                       compatible = "usb-nop-xceiv";
+                       clocks = <&cgu JZ4770_CLK_OTG_PHY>;
+                       clock-names = "main_clk";
+               };
+       };
+};
+
+&ext {
+       clock-frequency = <12000000>;
+};
+
+&uart2 {
+       status = "okay";
+};
+
+&cgu {
+       /* Put high-speed peripherals under PLL1, such that we can change the
+        * PLL0 frequency on demand without having to suspend peripherals.
+        * We use a rate of 432 MHz, which is the least common multiple of
+        * 27 MHz (required by TV encoder) and 48 MHz (required by USB host).
+        */
+       assigned-clocks =
+               <&cgu JZ4770_CLK_PLL1>,
+               <&cgu JZ4770_CLK_UHC>;
+       assigned-clock-parents =
+               <0>,
+               <&cgu JZ4770_CLK_PLL1>;
+       assigned-clock-rates =
+               <432000000>;
+};
+
+&uhc {
+       /* The WiFi module is connected to the UHC. */
+       status = "okay";
+};
diff --git a/arch/mips/configs/gcw0_defconfig b/arch/mips/configs/gcw0_defconfig
new file mode 100644 (file)
index 0000000..99ac1fa
--- /dev/null
@@ -0,0 +1,27 @@
+CONFIG_MACH_INGENIC=y
+CONFIG_JZ4770_GCW0=y
+CONFIG_HIGHMEM=y
+# CONFIG_BOUNCE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
+# CONFIG_SECCOMP is not set
+CONFIG_NO_HZ_IDLE=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_EMBEDDED=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_SUSPEND is not set
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_NETDEVICES=y
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_INGENIC=y
+CONFIG_USB=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_TMPFS=y
index 29a9361..4dd0c44 100644 (file)
@@ -8,6 +8,10 @@ config JZ4740_QI_LB60
        bool "Qi Hardware Ben NanoNote"
        select MACH_JZ4740
 
+config JZ4770_GCW0
+       bool "Game Consoles Worldwide GCW Zero"
+       select MACH_JZ4770
+
 config JZ4780_CI20
        bool "MIPS Creator CI20"
        select MACH_JZ4780