Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1783990rwb; Sat, 19 Nov 2022 03:34:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf6hIttoDzcO1wxtuJMB9rZESFDGOa0JmjHCnrtEzdwj7Vf1COby0UPi1nttOzGpCO0ITm/0 X-Received: by 2002:a17:906:32c7:b0:7ad:934f:abc2 with SMTP id k7-20020a17090632c700b007ad934fabc2mr8590283ejk.690.1668857669341; Sat, 19 Nov 2022 03:34:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668857669; cv=none; d=google.com; s=arc-20160816; b=0ozbH8fUhODqkZ0CMBFgSVP/HqOJxtaeAq0tIe6zDtxC4QSaAjdm9D0LGSyz0M2drU /Vy4jVSyNVJlW9SEmADdX64ZFLJgxqZjtBthiIP7+geJfKt0ovmKzD0qGZ36VpRv+jI7 uRNsUOh6FFA5CIgy5U6IpS9BomK6tvEstcxpSt/0Ud9cjhAAOh8PWTaVQdcRvr3FhJT0 es7EOUCaFX0TGtuSIPZu1sG6DMzpVDTA4EbRDCHFC1yOmoXUN8dhJOOiYnkLId4JUN5f rOPrraX5OycdxrKFd5Kt2TwKMbphniwSg8ONaon64O0MyUSA4jCk+wFi+GTINlP4n5w9 7GjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=vhn+hErl62ABHoWZ0zAqEw/dgV4fmIvmwdDtGod2U1A=; b=xwc6smnMDxb/77Uvx5mK1iIBwjGoSQteQT8/DrqnlFwDkKC6aUoLIULhYZZ+14R7cO 0gmW5o11S4RliCL7tsUtkwRjH+Z9iR3opmuCZSVpiK1mNfh9tc5NjOB/Fql80CaKucTN 7LmrRHVtCV0w9lVWANOE89Y/t4zlJgf3BqP5wsFtuVtIiHYzazN1QG/1yxWfVgSEA6RL SlzlvrRSfmcW90DCvEz4rj6CEQWe9I/ediQPemTBucgfjUR+fzZ5AxlGL95WpsdpUI4J VhPUA75uRW/y8b0ojky0Mh9H0LMI2ivA+U8KyaPdF0XT0BG5N3j3jbfex6KPhDpkVta1 lXNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020a056402348a00b0045d5a712e82si5348829edc.586.2022.11.19.03.34.00; Sat, 19 Nov 2022 03:34:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231959AbiKSLbB (ORCPT + 91 others); Sat, 19 Nov 2022 06:31:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229824AbiKSLbA (ORCPT ); Sat, 19 Nov 2022 06:31:00 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9198311A14; Sat, 19 Nov 2022 03:30:58 -0800 (PST) Received: (Authenticated sender: ash@heyquark.com) by mail.gandi.net (Postfix) with ESMTPSA id 692EAFF806; Sat, 19 Nov 2022 11:30:45 +0000 (UTC) From: Ash Logan To: krzysztof.kozlowski+dt@linaro.org, paulus@samba.org, mpe@ellerman.id.au, christophe.leroy@csgroup.eu, robh+dt@kernel.org, benh@kernel.crashing.org, segher@kernel.crashing.org, pali@kernel.org Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, j.ne@posteo.net, linkmauve@linkmauve.fr, rw-r-r-0644@protonmail.com, devicetree@vger.kernel.org, joel@jms.id.au Subject: [PATCH v4 00/11] powerpc: Nintendo Wii U support Date: Sat, 19 Nov 2022 22:30:30 +1100 Message-Id: <20221119113041.284419-1-ash@heyquark.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20220628133144.142185-1-ash@heyquark.com> References: <20220628133144.142185-1-ash@heyquark.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following patches add basic support for the Nintendo Wii U video game console, a PowerPC system somewhat similar to the GameCube and Wii. This includes: - devicetree source - bootwrapper support - udbg console to bootloader - early udbg console - interrupt controllers - platform support - recognition of the Espresso processor This is enough to boot on hardware. dmesg pics (with a small hack to udbg-immortal, not included): Link: https://wiki.linux-wiiu.org/images/7/7e/Mainline-initial-dmesg1.png Link: https://wiki.linux-wiiu.org/images/9/91/Mainline-initial-dmesg2.png For those who have hardware and would like to try these patches, some modification is required to the stock OS to allow Linux. For info: https://wiki.linux-wiiu.org/wiki/AdvancedSetup Some of the design choices (new platform > embedded6xx) were discussed previously: Link: https://lore.kernel.org/lkml/0020d47c-0e23-822c-33f5-ccb7ea4c1072@heyquark.com/T/ Turns out even less changes were needed than previously anticipated for discontiguous memory, and KUAP is yet to give trouble. Thanks to those who helped and discussed this. Changes since v3: - Reworked devicetree bindings - thanks Krzysztof Kozlowski for the review. - Update devicetree source to match. - Fixes to ensure patches apply to current source. Changes since v2: - Fixed some overzealous deleting in the devicetree, oops. - Fixed missing declarations for some functions (thanks robots) - Fixed some checkpatch warnings. - Mark latte as a simple-bus and use of_platform_default_populate. Changes since v1: - Style and formatting tweaks to the devicetree, thanks Rob Herring for the review. Ash Logan (11): dt-bindings: wiiu: Document the Nintendo Wii U devicetree powerpc: wiiu: device tree powerpc: wiiu: bootwrapper support powerpc: wiiu: introduce wiiu platform powerpc: wiiu: declare as non-coherent powerpc: wiiu: udbg support for latteipc powerpc: wiiu: espresso interrupt controller support powerpc: wiiu: latte interrupt controller support powerpc: espresso processor support powerpc: wiiu: platform support powerpc: wiiu: add minimal default config .../bindings/powerpc/nintendo/wiiu.yaml | 25 ++ .../powerpc/nintendo/wiiu/espresso-pic.yaml | 48 +++ .../bindings/powerpc/nintendo/wiiu/gpu7.yaml | 42 +++ .../powerpc/nintendo/wiiu/latte-ahci.yaml | 50 +++ .../powerpc/nintendo/wiiu/latte-dsp.yaml | 35 ++ .../powerpc/nintendo/wiiu/latte-pic.yaml | 55 +++ .../powerpc/nintendo/wiiu/latte-sdhci.yaml | 46 +++ .../bindings/powerpc/nintendo/wiiu/latte.yaml | 31 ++ .../devicetree/bindings/usb/generic-ehci.yaml | 1 + arch/powerpc/Kconfig.debug | 9 + arch/powerpc/boot/Makefile | 4 + arch/powerpc/boot/dts/wiiu.dts | 319 ++++++++++++++++++ arch/powerpc/boot/wiiu-head.S | 103 ++++++ arch/powerpc/boot/wiiu.c | 73 ++++ arch/powerpc/boot/wrapper | 4 + arch/powerpc/configs/wiiu_defconfig | 7 + arch/powerpc/include/asm/udbg.h | 1 + arch/powerpc/kernel/cpu_specs_book3s_32.h | 15 + arch/powerpc/kernel/head_book3s_32.S | 20 ++ arch/powerpc/kernel/udbg.c | 3 + arch/powerpc/platforms/Kconfig | 1 + arch/powerpc/platforms/Kconfig.cputype | 2 +- arch/powerpc/platforms/Makefile | 1 + arch/powerpc/platforms/wiiu/Kconfig | 22 ++ arch/powerpc/platforms/wiiu/Makefile | 4 + arch/powerpc/platforms/wiiu/espresso-pic.c | 183 ++++++++++ arch/powerpc/platforms/wiiu/espresso-pic.h | 59 ++++ arch/powerpc/platforms/wiiu/latte-pic.c | 259 ++++++++++++++ arch/powerpc/platforms/wiiu/latte-pic.h | 23 ++ arch/powerpc/platforms/wiiu/setup.c | 60 ++++ arch/powerpc/platforms/wiiu/udbg_latteipc.c | 126 +++++++ arch/powerpc/platforms/wiiu/udbg_latteipc.h | 27 ++ 32 files changed, 1657 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/powerpc/nintendo/wiiu.yaml create mode 100644 Documentation/devicetree/bindings/powerpc/nintendo/wiiu/espresso-pic.yaml create mode 100644 Documentation/devicetree/bindings/powerpc/nintendo/wiiu/gpu7.yaml create mode 100644 Documentation/devicetree/bindings/powerpc/nintendo/wiiu/latte-ahci.yaml create mode 100644 Documentation/devicetree/bindings/powerpc/nintendo/wiiu/latte-dsp.yaml create mode 100644 Documentation/devicetree/bindings/powerpc/nintendo/wiiu/latte-pic.yaml create mode 100644 Documentation/devicetree/bindings/powerpc/nintendo/wiiu/latte-sdhci.yaml create mode 100644 Documentation/devicetree/bindings/powerpc/nintendo/wiiu/latte.yaml create mode 100644 arch/powerpc/boot/dts/wiiu.dts create mode 100644 arch/powerpc/boot/wiiu-head.S create mode 100644 arch/powerpc/boot/wiiu.c create mode 100644 arch/powerpc/configs/wiiu_defconfig create mode 100644 arch/powerpc/platforms/wiiu/Kconfig create mode 100644 arch/powerpc/platforms/wiiu/Makefile create mode 100644 arch/powerpc/platforms/wiiu/espresso-pic.c create mode 100644 arch/powerpc/platforms/wiiu/espresso-pic.h create mode 100644 arch/powerpc/platforms/wiiu/latte-pic.c create mode 100644 arch/powerpc/platforms/wiiu/latte-pic.h create mode 100644 arch/powerpc/platforms/wiiu/setup.c create mode 100644 arch/powerpc/platforms/wiiu/udbg_latteipc.c create mode 100644 arch/powerpc/platforms/wiiu/udbg_latteipc.h base-commit: 094226ad94f471a9f19e8f8e7140a09c2625abaa -- 2.38.1