From patchwork Wed Aug 17 20:05:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 597967 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 21948C25B08 for ; Wed, 17 Aug 2022 20:05:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240335AbiHQUFw (ORCPT ); Wed, 17 Aug 2022 16:05:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231300AbiHQUFv (ORCPT ); Wed, 17 Aug 2022 16:05:51 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A86965A2DD for ; Wed, 17 Aug 2022 13:05:50 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id h24so3330207wrb.8 for ; Wed, 17 Aug 2022 13:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=G88Wg8efx4vUqMWMZ62OXKazA2toNV7pxgmBvPS4y7g=; b=UjMVkMOhH0QDp6O/pCgKkjwAgoTr7VLaEZvWBQ+tjcd31e0GYx2VQdEmdGYONFZlBV JXSoVTKAwZz2v4YW/Uizoa99V8t3dHzfTeno0mWPMNhh4igom0Bmr6ijGRVDHpyMGd7K RD33fy8KrpjEF9DtfgDokOP/K0xkdEBYEZgLbmuvpjzpJ77YnXuGes8IGqUhqOEtcuTz 1EtmXbFWHbm8sgCgqbfJwoywVRFVNGycJiPJnMqkXnaxVeGp5CUmEstg4+UHY5j1Wvvc OYe7bnF33uDXEY5dt1xkYnKlxySlYViNcOylr1RCwj3UfknSZbnUPfMlStx4kPmCFh6a AtQA== 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; bh=G88Wg8efx4vUqMWMZ62OXKazA2toNV7pxgmBvPS4y7g=; b=MDdDRluSj5JlEzUrw9BcEeiQApHsKCPetSneLUbWVbdKmnKRcS2D4YJDZm7rK8bZ8+ cMCNVe6klKDue9yt616njKyzm5k6XIhCX5bvAuhqJdXFIHUexClOpPl8LP1Hb0QSUWSl OBMQn8aPlyqblnMQlsNuKWaMq/86OyzfDBPinRjIda42jJ/vXELNeFyZqhtBcjHUd0Kk eWSeG8h8cFdsenvVxcB6vKFRlosS/CrI5u3W3Grj3mz5OFPuXXRym5ThIQvZV90d1IjU IR27hfGSKghoGKLaCOo1cAw3ch8RZLqg235oPOoBFj68BbjYHLIt6bnCp0zNl99RLFCQ hzBg== X-Gm-Message-State: ACgBeo1s0DMLQ8UnXwCqUAkP1LNEM4NdBSy2W6LVX17IpqsGPHTSYnTe jMksRamJ17P+wHrzJxb77mbtkQ== X-Google-Smtp-Source: AA6agR5IgGfJqwk47mOqzOms5cJpBLn149vtKJEQDmN0sxHazUEu1rNO09FeTJ5nbKwwA4+D0l30ow== X-Received: by 2002:a05:6000:617:b0:225:1d23:467a with SMTP id bn23-20020a056000061700b002251d23467amr4681470wrb.692.1660766749119; Wed, 17 Aug 2022 13:05:49 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id i133-20020a1c3b8b000000b003a531c7aa66sm3400883wma.1.2022.08.17.13.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 13:05:47 -0700 (PDT) From: Conor Dooley To: Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Palmer Dabbelt , Paul Walmsley , Albert Ou Cc: Daniel Lezcano , Anup Patel , Conor Dooley , Guo Ren , Sagar Kadam , Jessica Clarke , Andrew Jones , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, qemu-riscv@nongnu.org Subject: [PATCH 0/4] Fix dt-validate issues on qemu dtbdumps due to dt-bindings Date: Wed, 17 Aug 2022 21:05:19 +0100 Message-Id: <20220817200531.988850-1-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Conor Dooley The device trees produced automatically for the virt and spike machines fail dt-validate on several grounds. Some of these need to be fixed in the linux kernel's dt-bindings, but others are caused by bugs in QEMU. Patches been sent that fix the QEMU issues [0], but a couple of them need to be fixed in the kernel's dt-bindings. The first patches add compatibles for "riscv,{clint,plic}0" which are present in drivers and the auto generated QEMU dtbs. The final patch should be ignored for all serious purposes unless you want to wash your eyes out afterwards, but JIC the versioned extensions ever come up, it's there. Thanks to Rob Herring for reporting these issues [1], Conor. To reproduce the errors: ./build/qemu-system-riscv64 -nographic -machine virt,dumpdtb=qemu.dtb dt-validate -p /path/to/linux/kernel/Documentation/devicetree/bindings/processed-schema.json qemu.dtb (The processed schema needs to be generated first) 0 - https://lore.kernel.org/linux-riscv/20220810184612.157317-1-mail@conchuod.ie/ 1 - https://lore.kernel.org/linux-riscv/20220803170552.GA2250266-robh@kernel.org/ Changes since v1: - drop the "legacy systems" bit from the binding descriptions - convert to a regex for the isa string Conor Dooley (4): dt-bindings: timer: sifive,clint: add legacy riscv compatible dt-bindings: interrupt-controller: sifive,plic: add legacy riscv compatible dt-bindings: riscv: add new riscv,isa strings for emulators dt-bindings: riscv: isa string bonus content .../sifive,plic-1.0.0.yaml | 5 +++++ .../devicetree/bindings/riscv/cpus.yaml | 9 ++++++--- .../bindings/timer/sifive,clint.yaml | 18 ++++++++++++------ 3 files changed, 23 insertions(+), 9 deletions(-) base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868