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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB81AC001E0 for ; Fri, 28 Jul 2023 00:11:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231578AbjG1ALO (ORCPT ); Thu, 27 Jul 2023 20:11:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbjG1ALM (ORCPT ); Thu, 27 Jul 2023 20:11:12 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 363AABF for ; Thu, 27 Jul 2023 17:11:11 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1bbc06f830aso10113855ad.0 for ; Thu, 27 Jul 2023 17:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1690503070; x=1691107870; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=gqNRWVrOFVBkH+VSmfu09hLMLUWIZedxHx1Mg4rsMuQ=; b=d2OF3EM9KD1Gz+cvj2pCUh/1Yj5q9pjk4yeRolGJ5YrTetpr/fOe8CuP+jxce2Ukpi Uly+gxlwzxpflH6nRUYG5wuOd8oDmFsPt1zUs6vw0EMfQ2aLHSY4M35IW/9uFEfDiHLA iAOVYMVPUu8E2/VQwufyh94Gprvod9xICH9rwpwpkOwpjAGghf5ui+eulfS/tyZDKU6b vsp550qP7XgPuYI7mzx10za+Z73Rqj133QVRDXeyg9l49Kz3o14NeljzexJVo5CkEAoo YUHwS98wLbaOM0u+mKrRiI5t8sTOcEwSyHO9y/OW1Tuqinmo7beDX3HALza/PlNc1ZnB cFMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690503070; x=1691107870; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gqNRWVrOFVBkH+VSmfu09hLMLUWIZedxHx1Mg4rsMuQ=; b=JYyt+FbqLS7O99Y6RKDA12jULyBjctfHCE3rAwrBDcZvXvwnmGi+uQ8PdBKB8GbpPg jSS/uQvIetxVUPxASaXFWgqhMfT490oL5mNvhe3wiLWzsK/vKjRoiX5S/8yogvp9prJH EW8A1YOYDpcJ/EZvz+VLOHnW+s/lTNsteftL2EZVELruSaR41C7GPzO7tEsesS1zRs1v e2z2uFvBA9CnCfvx3pQjixLsgdOJ1pdDI+e1ztOxkNS8pxlit4mvGGhU4+GPIpFaoOv9 RBhRbWk8h/bhzjyVci4zS0y+BtOyfXm7GETsZFuUT1GvZoSpFyfMxNZN5QNc4Neh2P+x nchA== X-Gm-Message-State: ABy/qLZuOWkEz8OGY/R2WHdDByrQ01ZNeidAUccosn6DEUbdPoxUvo6C 01jcuXwiX6Nwdk1zUYJjWBm0gQ== X-Google-Smtp-Source: APBJJlHiOMKTmPn4xexa7u68szd4odgOExv7eGQ9Eaq77/8uCykPj7QdZYFF40DGQ4hv5SQqsug33w== X-Received: by 2002:a17:903:32cf:b0:1b9:d38d:efb1 with SMTP id i15-20020a17090332cf00b001b9d38defb1mr290557plr.8.1690503070496; Thu, 27 Jul 2023 17:11:10 -0700 (PDT) Received: from x1 ([2601:1c2:1800:f680:dacb:3a1a:fcaf:c0fc]) by smtp.gmail.com with ESMTPSA id l16-20020a170902f69000b001b8a3729c23sm2230932plg.17.2023.07.27.17.11.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 17:11:10 -0700 (PDT) Date: Thu, 27 Jul 2023 17:11:08 -0700 From: Drew Fustini To: Xi Ruoyao Cc: Jisheng Zhang , Conor Dooley , Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Palmer Dabbelt , Paul Walmsley , Albert Ou , Daniel Lezcano , Guo Ren , Fu Wei , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v3 0/8] Add Sipeed Lichee Pi 4A RISC-V board support Message-ID: References: <20230617161529.2092-1-jszhang@kernel.org> <20230725-unheard-dingy-42f0fafe7216@wendy> <3e0994dab495920ac590dc28d6b9d9765abe0c7e.camel@linuxfromscratch.org> <866eab3e30a18c50742a75d62aee223fdc7e3cee.camel@linuxfromscratch.org> <4986b92f1a5aa303a529c6004aaedd2184c3ccf7.camel@linuxfromscratch.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4986b92f1a5aa303a529c6004aaedd2184c3ccf7.camel@linuxfromscratch.org> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Jul 27, 2023 at 08:54:59AM +0800, Xi Ruoyao wrote: > On Thu, 2023-07-27 at 08:14 +0800, Xi Ruoyao wrote: > > On Wed, 2023-07-26 at 23:00 +0800, Jisheng Zhang wrote: > > > which dts r u using? see below. > > > > > > > > > > > Or maybe my toolchain (GCC 13.1.0, Binutils-2.40, with no patches) can > > > > miscompile the kernel? > > > > /* snip */ > > > > > > Boot HART ID              : 0 > > > > Boot HART Domain          : root > > > > Boot HART Priv Version    : v1.11 > > > > Boot HART Base ISA        : rv64imafdcvx > > > > > > what? I don't think the mainline dts provide v and x. > > > > I copied the compiled arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dtb > > into /boot and loaded it with u-boot "load" command onto 0x46000000, and > > passed this address to the booti command. > > > > But maybe I've copied the wrong file or made some other mistake... I'll > > recheck. > > Hmm, and if I read OpenSBI code correctly, this line reflects the > content of the misa CSR, not the DT riscv,isa value. > > The log of successful boot provided by Drew also contains > "rv64imafdcvx": > > https://gist.github.com/pdp7/23259595a7570f1f11086d286e16dfb6 In case it helps, the thead fork of u-boot contains an important file include/configs/light-c910.h that defines the boot scripts for each board. Here is the BeagleV Ahead: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead-u-boot/-/blob/beaglev-v2020.01-1.1.2/include/configs/light-c910.h#L361 It might give some clues as to want commands to try. >From the lpi4a config: https://github.com/revyos/thead-u-boot/blob/09e2c3f93f1a64c10ca51d9b9c0c22fbc0947c43/configs/light_lpi4a_defconfig It looks like it sets: CONFIG_TARGET_LIGHT_FM_C910_LPI4A=y And that corresponds to: https://github.com/revyos/thead-u-boot/blob/09e2c3f93f1a64c10ca51d9b9c0c22fbc0947c43/include/configs/light-c910.h#L425 Anyways, I finally got my Lichee Pi 4a out of the box, and I am going to try it out too. -Drew