Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3160900rwl; Sun, 2 Apr 2023 01:29:36 -0700 (PDT) X-Google-Smtp-Source: AKy350Yv0c5wb89bRQ+Fz8qjyi4LLB/TTMzR5COZt2YX0ihtkWi7wexjqDkM4OnSe6cG2L7xM1kt X-Received: by 2002:a17:90b:4a07:b0:237:1f17:6842 with SMTP id kk7-20020a17090b4a0700b002371f176842mr36602479pjb.10.1680424176029; Sun, 02 Apr 2023 01:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680424176; cv=none; d=google.com; s=arc-20160816; b=TL/bSs+1BJkJw9D883+lH1zYJQ+No6E7ZsodlmanHN681KkRU0IS7XBnpdYMldh44i 6OhMhGEyEq+B/XDE/V1rBKYmjUxN7/yej7Kk2s+rWcHsUZnGExKA/fI6H3DG7OLzSUEY 1TMFh1UkQ0XezyUUI1NhjlNvyPexfHv+tLVxTriShWD2+9vqpHvfZgHXh+6eeO9Dzb9J GalLqgakRHFejbSheW2DgSiGlprlaXxyse5SsnndS3y8SXJB+QH603rLUtwjZ816snx5 xpQYIgODctgmpzlz9Sk8tH2z+Y5EEZdAEarJLfGQ8qd6FabXcHZByvEhMha85QSa6G8L CD3w== 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 :message-id:references:in-reply-to:user-agent:subject:cc:to:from :date:dkim-signature; bh=WZ7dhvm1PWzCz1AONZHj6kqpHKUFdWtJuMl6SXCm1IA=; b=CHCdcsTrpf/Dli/XMVVnIp5q4sd3zugd2XMr3Qr/JsBAt6wBDr5Iuo26ZyCEFmAS+D mEZA30Du0rWoG6AgSEnYUjHLR3UWYqK/EMqNlAeAVZrhYiA3tsc9lkWMmjRDvk18iUoN zWrFA9Mu+kPbo0r2VE3xfoHOBLmSQ7SSYK6gwf+hlP1QTMOortLK8ZiFAbbwCM75HSE8 X+yrJgs/M8Retd+XlTykTJBoFy84uXJoeFqXoOexlEpnsw6sP2dAxsnmagVJKfMsUwpE q1wwa/aWttRanKWYCO4gX6MvvOGfxN/oyuyvRZ0JMu8zQEzSnQTWrJv7rIyOUXKzFb8O 7QEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U03GhHvo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n5-20020a17090a5a8500b0023414093852si10046477pji.25.2023.04.02.01.29.24; Sun, 02 Apr 2023 01:29:36 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U03GhHvo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230257AbjDBIXM (ORCPT + 99 others); Sun, 2 Apr 2023 04:23:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbjDBIXK (ORCPT ); Sun, 2 Apr 2023 04:23:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7242F1A952; Sun, 2 Apr 2023 01:23:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0036D61084; Sun, 2 Apr 2023 08:23:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D4D1C4339B; Sun, 2 Apr 2023 08:23:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680423788; bh=rqmI+2ncgqv8TeVA56uwwXT2fHfEv1PS7v4WdYAbJXw=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=U03GhHvo77HswkSeu6SilRZCfbKYZ8VczUx+ZoWMRuVVCmcLL7PiM2mtrJaiIHLdq Y9NwfQGrD2kBzXRX9J0Rw0g0yzmLQwGqDxnSQFRdoraT7iv8SzFgsu4V1QXnJTSuKo oSGybFvAOiNCiKSWZtofVLER2qVUuckiul79YCLyRsolojJ7SltDyP5dmMrK3MM1zt gOSIHj4VZmx7gsuuiIoY2gUT+UDwGSXT4obZkUtSMkxgqKXQS9AjPGHJjo+UnTDHWH 58aG/tYd+uM+1MhPM9pWdPC/YU/xIaUzssvW70fljgwKCJAiZwQyNjkYIGZTaXoZto w/PIi0HK2AXiw== Date: Sun, 02 Apr 2023 09:23:03 +0100 From: Conor Dooley To: Xu Yilun , Conor Dooley CC: linux-fpga@vger.kernel.org, Daire McNamara , Rob Herring , Krzysztof Kozlowski , Moritz Fischer , Wu Hao , Tom Rix , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/7] PolarFire SoC Auto Update Support User-Agent: K-9 Mail for Android In-Reply-To: References: <20230331071823.956087-1-conor.dooley@microchip.com> Message-ID: <958EDDDE-B62D-4CCC-9851-0F01516D95CD@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 On 2 April 2023 09:00:34 IST, Xu Yilun wrote: >On 2023-03-31 at 08:18:16 +0100, Conor Dooley wrote: >> Hey all, >>=20 >> This patchset adds support for the "Auto Update" feature on PolarFire >> SoC that allows for writing an FPGA bistream to the SPI flash connected >> to the system controller=2E >> On powercycle (or reboot depending on how the firmware implements the >> openSBI SRST extension) "Auto Update" will take place, and program the >> FPGA with the contents of the SPI flash - provided that that image is >> valid and an actual upgrade from that already programmed! >>=20 >> Unfortunately, this series is not really testable yet - the Engineering >> Sample silicon on most dev boards has a bug in the QSPI controller >> connected to the system controller's flash and cannot access it=2E >> Pre-production and later silicon has this bug fixed=2E >>=20 >> I previously posted an RFC about my approach in this driver, since as a >> flash-based FPGA we are somewhat different to the existing >> self-reprogramming drivers here=2E That RFC is here: >> https://lore=2Ekernel=2Eorg/linux-fpga/20221121225748=2E124900-1-conor@= kernel=2Eorg/ >>=20 >> This series depends on the following fixes: >> https://lore=2Ekernel=2Eorg/all/d7c3ec51-8493-444a-bdec-2a30b0a15bdc@sp= ud/ > >Is that series already merged? If yes, just remove this line=2E >If no, either put all of them in one series, or still make this series >as RFC until the dependency is resolved=2E Merged into what? I'll be applying the dependencies tomorrow probably=2E > >Thanks, >Yilun > >>=20 >> The patch adding the driver depends on the soc patches earlier in the >> series, so taking both through the same tree makes sense=2E Depending o= n >> sequencing with the dependencies, me taking it through the soc tree >> (with Acks etc of course) may make the most sense=2E >>=20 >> Cheers, >> Conor=2E >>=20 >> Changes in v2: >> - per Russ' suggestion, the driver has been switched to using the >> firmware-upload API rather than the fpga one >> - as a result of that change, the structure of the driver has changed >> significantly, although most of that is reshuffling existing code >> around >> - check if the upgrade is possible in probe and fail if it isn't >> - only write the image index if it is not already set >> - delete the now unneeded debugfs bits >>=20 >> CC: Conor Dooley >> CC: Daire McNamara >> CC: Rob Herring >> CC: Krzysztof Kozlowski >> CC: Moritz Fischer >> CC: Wu Hao >> CC: Xu Yilun >> CC: Tom Rix >> CC; Russ Weight >> CC: linux-riscv@lists=2Einfradead=2Eorg >> CC: devicetree@vger=2Ekernel=2Eorg >> CC: linux-kernel@vger=2Ekernel=2Eorg >> CC: linux-fpga@vger=2Ekernel=2Eorg >>=20 >> Conor Dooley (7): >> soc: microchip: mpfs: add a prefix to rx_callback() >> dt-bindings: soc: microchip: add a property for system controller >> flash >> soc: microchip: mpfs: enable access to the system controller's flash >> soc: microchip: mpfs: print service status in warning message >> soc: microchip: mpfs: add auto-update subdev to system controller >> fpga: add PolarFire SoC Auto Update support >> riscv: dts: microchip: add the mpfs' system controller qspi & >> associated flash >>=20 >> =2E=2E=2E/microchip,mpfs-sys-controller=2Eyaml | 10 + >> =2E=2E=2E/boot/dts/microchip/mpfs-icicle-kit=2Edts | 21 + >> arch/riscv/boot/dts/microchip/mpfs=2Edtsi | 24 +- >> drivers/fpga/Kconfig | 11 + >> drivers/fpga/Makefile | 3 +- >> drivers/fpga/microchip-auto-update=2Ec | 494 ++++++++++++++++= ++ >> drivers/soc/microchip/Kconfig | 1 + >> drivers/soc/microchip/mpfs-sys-controller=2Ec | 37 +- >> include/soc/microchip/mpfs=2Eh | 2 + >> 9 files changed, 591 insertions(+), 12 deletions(-) >> create mode 100644 drivers/fpga/microchip-auto-update=2Ec >>=20 >> --=20 >> 2=2E39=2E2 >>=20