From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D753DC4338F for ; Sun, 25 Jul 2021 23:32:28 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 103EF60E77 for ; Sun, 25 Jul 2021 23:32:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 103EF60E77 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=yifangu.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 800B18323E; Mon, 26 Jul 2021 01:32:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=yifangu.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 01D4F83243; Mon, 26 Jul 2021 01:16:44 +0200 (CEST) Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6F7668262E for ; Mon, 26 Jul 2021 01:16:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=yifangu.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=gyf304@gmail.com Received: by mail-qv1-f45.google.com with SMTP id s14so4244700qvm.4 for ; Sun, 25 Jul 2021 16:16:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jnzzj0L18AYhS3EFGZr2SaTRB0QXcDCD6rHkz3cpERs=; b=H2hkDm0QiAyjeYc3+liF7FuHcdy0YDDfYntlLiXRkFOGJWTa5ADNOe9z+LjlgBUyqF e1VXScD4vbqo1lKskJzXJCmU49j0CovBW4JdGkUV+g2TfygwYbuH/vIHpYhIf7gRessn MS7rl+HJcplUuy/or6hv/mQYZo0ZTljfhOqvfh+bhA2bBvTpGcr9vm4pkON0r0BAayI5 2fxG9dh1CsgGrLi0sVb4zVMvU3UuNsWDjBhe/xpRMjyUa5n6cIKvm6//m2l0gyVXQ2Rh lsZFSus+11kFTCKH3pyEo9C3ducn9cUfvuqUJlXaKiSYS3n/AWwezQgkztGzF+lOdCbo XpAQ== X-Gm-Message-State: AOAM531LgQWMjqLiTF3SUVN31XmVnVwyrMysnCDdGp4PUHUAFzOuPrXk b9V3QAuEbC1z24pno+ZeXneq5Bth+F/xcSsv X-Google-Smtp-Source: ABdhPJwM+mZzIp8vjgWOaFizya4nDcQ7rDGnop+kP93onkqgWPgcZQ6neh7Z4z7ZrBmolxIRc1ZpCQ== X-Received: by 2002:ad4:44aa:: with SMTP id n10mr2672081qvt.18.1627254997918; Sun, 25 Jul 2021 16:16:37 -0700 (PDT) Received: from yifangu-Virtual-Machine.mshome.net (pool-100-6-159-43.pitbpa.fios.verizon.net. [100.6.159.43]) by smtp.gmail.com with ESMTPSA id u184sm17754694qkd.53.2021.07.25.16.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 16:16:37 -0700 (PDT) From: Yifan Gu To: u-boot@lists.denx.de Cc: Yifan Gu , Jagan Teki , Andre Przywara , Icenowy Zheng , George Hilliard Subject: [PATCH 00/27] Add F1C100s based PocketGo handheld support Date: Sun, 25 Jul 2021 19:16:09 -0400 Message-Id: <20210725231636.879913-1-me@yifangu.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 26 Jul 2021 01:32:10 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean This series add support for the PocketGo handheld, a low cost portable gaming console that is based on the Allwinner F1C100s chip. A significant portion of this patchset is authored by: - Icenowy Zheng - George Hilliard This patchset includes 4 parts necessary to make PocketGo work: - suniv + f1c100s support by Icenowy Zheng , rebased by George Hilliard and then by me. See: https://github.com/Icenowy/u-boot/commits/f1c100s-spiflash - additional support for suniv clock and MMC controller by George Hilliard, rebased. See: https://github.com/thirtythreeforty/u-boot/tree/f1c100s-v2019.04 - additional support for serial uart1, and misc fixes for compilation, SPL -> U-Boot proper load on F1C100s. - DTS and defconfig for PocketGo I have accidentally CC'ed a few people while testing git send-email, I am awfully sorry for my lack of experience in email-patch based workflows. This is my first time attempting to contribute to U-Boot. Cc: Jagan Teki Cc: Andre Przywara Cc: Icenowy Zheng Cc: George Hilliard George Hilliard (6): sunxi: Don't provide enable_cache() on suniv sunxi: implement clock driver for suniv f1c100s sunxi: gpio: Add support for suniv-f1c100s sunxi: spi: restore bus speed and mode after reset sunxi: spi: Add suniv pin controller support sunxi: suniv: add device tree nodes for f1c100s MMC controllers Icenowy Zheng (12): arm: arm926ejs: start.S: port save_boot_params support from armv7 code arm: arm926ej-s: add sunxi code sunxi: add support for suniv architecture sunxi: suniv: add support for Lichee Pi Nano sunxi: suniv: add boot sequence for SPL to try sunxi: spi-spl: add support for SUNIV sunxi: add SPI0 node for suniv sunxi: enable SPI NOR on Lichee Pi Nano sunxi: add defconfig for Lichee Pi Nano with SPI Flash support sunxi: add support for UART at PF for suniv sunxi: do not set PF MMC0 pinmux when PF uart is used sunxi: allow to enable MMC driver when using PF UART0 Yifan Gu (9): arm: dts: sunxi: do not renumber if mmc2 does not exist board: licheepi_nano: set CONFIG_MMC_SUNXI_SLOT_EXTRA sunxi: suniv: add missing header include for udelay sunxi: suniv: allow serial connection on uart1 sunxi: suniv: do not detect boot sector on suniv sunxi: suniv: set SYS_TEXT_BASE default sunxi: suniv: disable mmc optimization for suniv arm: dts: suniv: define uart1 pins arm: dts: add pocketgo handheld support arch/arm/cpu/arm926ejs/Makefile | 1 + arch/arm/cpu/arm926ejs/start.S | 19 + arch/arm/cpu/arm926ejs/sunxi/Makefile | 16 + arch/arm/cpu/arm926ejs/sunxi/config.mk | 6 + arch/arm/cpu/arm926ejs/sunxi/fel_utils.S | 38 ++ arch/arm/cpu/arm926ejs/sunxi/lowlevel_init.S | 68 +++ arch/arm/cpu/arm926ejs/sunxi/start.c | 1 + arch/arm/cpu/arm926ejs/sunxi/timer.c | 114 ++++ arch/arm/cpu/arm926ejs/sunxi/u-boot-spl.lds | 63 +++ arch/arm/dts/Makefile | 3 + arch/arm/dts/suniv-f1c100s-licheepi-nano.dts | 58 ++ arch/arm/dts/suniv-f1c100s-pocketgo.dts | 48 ++ arch/arm/dts/suniv-f1c100s.dtsi | 6 + arch/arm/dts/suniv.dtsi | 253 +++++++++ arch/arm/dts/sunxi-u-boot.dtsi | 2 + arch/arm/include/asm/arch-sunxi/clock.h | 2 +- arch/arm/include/asm/arch-sunxi/clock_sun6i.h | 21 + arch/arm/include/asm/arch-sunxi/cpu_sun4i.h | 8 + arch/arm/include/asm/arch-sunxi/dram.h | 2 + arch/arm/include/asm/arch-sunxi/dram_suniv.h | 47 ++ arch/arm/include/asm/arch-sunxi/gpio.h | 3 + arch/arm/mach-sunxi/Kconfig | 16 +- arch/arm/mach-sunxi/Makefile | 2 + arch/arm/mach-sunxi/board.c | 37 +- arch/arm/mach-sunxi/clock.c | 3 +- arch/arm/mach-sunxi/clock_sun6i.c | 47 +- arch/arm/mach-sunxi/cpu_info.c | 2 + arch/arm/mach-sunxi/dram_helpers.c | 4 + arch/arm/mach-sunxi/dram_suniv.c | 497 ++++++++++++++++++ arch/arm/mach-sunxi/spl_spi_sunxi.c | 13 + board/sunxi/board.c | 8 +- common/Kconfig.boot | 3 +- configs/licheepi_nano_defconfig | 10 + configs/licheepi_nano_spiflash_defconfig | 26 + configs/pocketgo_defconfig | 12 + drivers/clk/sunxi/Kconfig | 7 + drivers/clk/sunxi/Makefile | 1 + drivers/clk/sunxi/clk_f1c100s.c | 66 +++ drivers/gpio/sunxi_gpio.c | 6 + drivers/mmc/Kconfig | 2 +- drivers/mmc/sunxi_mmc.c | 6 +- drivers/spi/spi-sunxi.c | 12 +- include/configs/suniv.h | 15 + include/configs/sunxi-common.h | 69 ++- include/dt-bindings/clock/suniv-ccu.h | 69 +++ include/dt-bindings/reset/suniv-ccu.h | 37 ++ 46 files changed, 1715 insertions(+), 34 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/sunxi/Makefile create mode 100644 arch/arm/cpu/arm926ejs/sunxi/config.mk create mode 100644 arch/arm/cpu/arm926ejs/sunxi/fel_utils.S create mode 100644 arch/arm/cpu/arm926ejs/sunxi/lowlevel_init.S create mode 100644 arch/arm/cpu/arm926ejs/sunxi/start.c create mode 100644 arch/arm/cpu/arm926ejs/sunxi/timer.c create mode 100644 arch/arm/cpu/arm926ejs/sunxi/u-boot-spl.lds create mode 100644 arch/arm/dts/suniv-f1c100s-licheepi-nano.dts create mode 100644 arch/arm/dts/suniv-f1c100s-pocketgo.dts create mode 100644 arch/arm/dts/suniv-f1c100s.dtsi create mode 100644 arch/arm/dts/suniv.dtsi create mode 100644 arch/arm/include/asm/arch-sunxi/dram_suniv.h create mode 100644 arch/arm/mach-sunxi/dram_suniv.c create mode 100644 configs/licheepi_nano_defconfig create mode 100644 configs/licheepi_nano_spiflash_defconfig create mode 100644 configs/pocketgo_defconfig create mode 100644 drivers/clk/sunxi/clk_f1c100s.c create mode 100644 include/configs/suniv.h create mode 100644 include/dt-bindings/clock/suniv-ccu.h create mode 100644 include/dt-bindings/reset/suniv-ccu.h -- 2.25.1