From patchwork Fri Sep 16 04:54:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 1678665 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=fQy3zzow; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MTYBt546Tz1ynm for ; Fri, 16 Sep 2022 22:23:34 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9145484BCE; Fri, 16 Sep 2022 14:22:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fQy3zzow"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A396084BA3; Fri, 16 Sep 2022 06:54:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) (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 BDF8984B8E for ; Fri, 16 Sep 2022 06:54:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=judge.packham@gmail.com Received: by mail-pj1-x1036.google.com with SMTP id i15-20020a17090a4b8f00b0020073b4ac27so19270238pjh.3 for ; Thu, 15 Sep 2022 21:54:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=MtxWL2ByPNcc3qIGhe2cKnW/Sfp3f5UNiBknotsl99Y=; b=fQy3zzowxq3ZgLVScIj62LqKCNnr33BwDYiap4nGyzfHhm/PYO08yV9uCUO86B1qkX frSj0cLYJx/RnH8vo3+x15UOyRHvT9plcmMEFca07xyELC7s7V0eOxF2x9hZE8OrmQBM yleBNjyrDw+yyVWsDzc0pfVN23yo7hoz3QEeicaatnrvO0RLtdHleaQw8bG0Q3cUAtbp SzxR2N283Ol5DPUgEUdz5J83Ce4IhrxqrrSfxMfhR8UDOY6hSiIP9Yb/UMVsz5e9Ch0E bqMm5AIpYDtaEWeaDBz69K+zkxIOEh+b6plP/5B/gAnPvfXaUVZf9MvSlasIug1fWvEh 1P6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=MtxWL2ByPNcc3qIGhe2cKnW/Sfp3f5UNiBknotsl99Y=; b=5Xq0nydwWdpgu4Y+Y4He+RJsJNZYgetoi1k1r/XRfAxkVxHjUgQDhmh+qIb3ifEhAC 6a5T6I59ewiXW5Di6NlyXcZNA9uVuSEb4kLAf53yw0akh0rw+YR5HGwIhUUr6WubFHIN kltepSBwaRtnEIc2y7pllzQg/uFRxaYlaSIWvpM8bhDP0sQWHXe232g8E2J6WVtjXLQk DOSfk34S6dwUemKUPUs8M6nRs+fjXk9hNBkE7t86vj64ZtMrtcCs174LSIHzTg34py+a 4rRQoY72/DbVtftNvbmDac6FNL+k3Ow7QK+aXaFJH+WEbxy/TAfNd8r9Y1SvYiHacgjz 4srQ== X-Gm-Message-State: ACrzQf1MFOaK3YvhVDyxq3GRRkLw57AjvuOxo+N2h7jE/qU1/Z8Vn+4M ty7A3BOSn1mYmUvdtjoR1YE= X-Google-Smtp-Source: AMsMyM7/IFNWBecDO8xEx8B7+ZiQDbOheeKgJYFlrtVX2PqTMGRyLwH1wJjUlreZn8VK2oikoPdqLw== X-Received: by 2002:a17:903:2290:b0:178:272b:e41e with SMTP id b16-20020a170903229000b00178272be41emr2917932plh.48.1663304080801; Thu, 15 Sep 2022 21:54:40 -0700 (PDT) Received: from chrisp-dl.atlnz.lc ([2001:df5:b000:22:1d7c:c94b:55d3:ab82]) by smtp.gmail.com with ESMTPSA id e7-20020a17090301c700b001782398648dsm12340346plh.8.2022.09.15.21.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Sep 2022 21:54:39 -0700 (PDT) From: Chris Packham To: Stefan Roese Cc: Elad Nachman , Vadym Kochan , Chris Packham , Adam Ford , Alice Guo , Amjad Ouled-Ameur , Andre Przywara , Chris Packham , Christian Hewitt , Fabio Estevam , Jim Liu , Joe Hershberger , Keerthy , Lukasz Majewski , Marcel Ziswiler , =?utf-8?q?Marek_Beh=C3=BAn?= , Marek Vasut , Michael Scott , Michael Walle , =?utf-8?q?Pali_Roh=C3=A1r?= , Peng Fan , Ramon Fried , Samuel Holland , Sean Anderson , Simon Glass , Tim Harvey , Tom Rini , Weijie Gao , Ye Li , "Ying-Chun Liu (PaulLiu)" , u-boot@lists.denx.de Subject: [PATCH 0/7] arm: mvebu: Support for 98DX25xx/98DX35xx (AlleyCat5) Date: Fri, 16 Sep 2022 16:54:16 +1200 Message-Id: <20220916045423.3635985-1-judge.packham@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 16 Sep 2022 14:22:08 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean These patches are based on Marvell's bootloader for the AlleyCat5/5X which was based on u-boot 2018.03. I've split that code into consumable chunks and dropped as much unnecessary stuff as I can. I've also tried to sync the device trees as much as possible with the support that will land in Linux 6.0 although there are still some differences Chris Packham (7): net: mvneta: Add support for AlleyCat5 usb: ehci: ehci-marvell: Support for marvell,ac5-ehci pinctrl: mvebu: Add AlleyCat5 support misc: mvebu: Add sample at reset driver arm: mvebu: Support for 98DX25xx/98DX35xx SoC arm: mvebu: Add RD-AC5X board tools: kwboot: Add knowledge of Marvell's TIM arch/arm/dts/Makefile | 3 +- arch/arm/dts/ac5-98dx25xx.dtsi | 292 +++++++++++++++++++++ arch/arm/dts/ac5-98dx35xx-rd.dts | 155 +++++++++++ arch/arm/dts/ac5-98dx35xx.dtsi | 17 ++ arch/arm/mach-mvebu/Kconfig | 14 +- arch/arm/mach-mvebu/Makefile | 1 + arch/arm/mach-mvebu/alleycat5/Makefile | 9 + arch/arm/mach-mvebu/alleycat5/clock.c | 49 ++++ arch/arm/mach-mvebu/alleycat5/cpu.c | 129 +++++++++ arch/arm/mach-mvebu/alleycat5/soc.c | 229 ++++++++++++++++ arch/arm/mach-mvebu/arm64-common.c | 15 ++ arch/arm/mach-mvebu/include/mach/clock.h | 11 + arch/arm/mach-mvebu/include/mach/cpu.h | 4 + arch/arm/mach-mvebu/include/mach/soc.h | 4 + board/Marvell/mvebu_alleycat-5/MAINTAINERS | 6 + board/Marvell/mvebu_alleycat-5/Makefile | 3 + board/Marvell/mvebu_alleycat-5/board.c | 35 +++ configs/mvebu_ac5_rd_defconfig | 89 +++++++ drivers/misc/Kconfig | 6 + drivers/misc/Makefile | 1 + drivers/misc/mvebu_sar/Makefile | 4 + drivers/misc/mvebu_sar/ac5_sar.c | 119 +++++++++ drivers/misc/mvebu_sar/sar-uclass.c | 146 +++++++++++ drivers/net/Kconfig | 2 +- drivers/net/mvneta.c | 66 ++++- drivers/pinctrl/mvebu/Kconfig | 2 +- drivers/usb/host/Kconfig | 1 + drivers/usb/host/ehci-marvell.c | 57 +++- include/configs/mvebu_alleycat-5.h | 92 +++++++ include/dm/uclass-id.h | 1 + include/fdtdec.h | 4 + include/mvebu/mvebu_chip_sar.h | 73 ++++++ include/mvebu/sar.h | 57 ++++ include/mvebu/var.h | 28 ++ include/sar-uclass.h | 23 ++ lib/fdtdec.c | 6 +- tools/kwbimage.h | 29 ++ tools/kwboot.c | 3 + 38 files changed, 1767 insertions(+), 18 deletions(-) create mode 100644 arch/arm/dts/ac5-98dx25xx.dtsi create mode 100644 arch/arm/dts/ac5-98dx35xx-rd.dts create mode 100644 arch/arm/dts/ac5-98dx35xx.dtsi create mode 100644 arch/arm/mach-mvebu/alleycat5/Makefile create mode 100644 arch/arm/mach-mvebu/alleycat5/clock.c create mode 100644 arch/arm/mach-mvebu/alleycat5/cpu.c create mode 100644 arch/arm/mach-mvebu/alleycat5/soc.c create mode 100644 arch/arm/mach-mvebu/include/mach/clock.h create mode 100644 board/Marvell/mvebu_alleycat-5/MAINTAINERS create mode 100644 board/Marvell/mvebu_alleycat-5/Makefile create mode 100644 board/Marvell/mvebu_alleycat-5/board.c create mode 100644 configs/mvebu_ac5_rd_defconfig create mode 100644 drivers/misc/mvebu_sar/Makefile create mode 100644 drivers/misc/mvebu_sar/ac5_sar.c create mode 100644 drivers/misc/mvebu_sar/sar-uclass.c create mode 100644 include/configs/mvebu_alleycat-5.h create mode 100644 include/mvebu/mvebu_chip_sar.h create mode 100644 include/mvebu/sar.h create mode 100644 include/mvebu/var.h create mode 100644 include/sar-uclass.h