From nobody Sat Apr 11 00:44:33 2026 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 DC19EC25B08 for ; Wed, 17 Aug 2022 20:06:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240851AbiHQUGA (ORCPT ); Wed, 17 Aug 2022 16:06:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241321AbiHQUFx (ORCPT ); Wed, 17 Aug 2022 16:05:53 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F19C5A2CA for ; Wed, 17 Aug 2022 13:05:52 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id ay39-20020a05600c1e2700b003a5503a80cfso1445758wmb.2 for ; Wed, 17 Aug 2022 13:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=1R6UrF0Wsbj6EmcSlPWRzTAwonFDames2nGAVyANWlQ=; b=emUeD3umpIWMTUwimxexv6coDslOSFZdTJZAG0mzIfyT8GhTm2y8Rz5AMG9Ml/own/ 1bvWibxPC5o+FKVmvr8wtGCmKyHocGnEAsXVO0ntDOfnJcELc45X3X92yWuj0qra73+b bi6yS6R7rH/1tgXaH7ew6gaJvDmgi3DFVyViPwHKiEf61xl3VsSjFE8tTGYOx3T3H8sw YpsLPRTKDXDpfnxxhi2vf/Hvx1riYhARNlfjzVIx2UCiXKxPouZe5cn25wjO1kcjdY7J dx/0jJrVOlVsCGDsup/V1cmbWyP5Gx3IFcBem4yoP9MuXeSBrOcHywknEN8fvwer7khG mxig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=1R6UrF0Wsbj6EmcSlPWRzTAwonFDames2nGAVyANWlQ=; b=MdET58H9QMVMWYMhTVuh6tjaVqDGH0ZgQiyH9R5TuLoA23I2N6Xerx/XZr+ECgLxAn E7u3ZVbFOZK5hv4/ny2GKs0SI6jiwoCrvt31CHPgjR93wKbydFbluV1snJsmZvOyBJeC pGjDXP2UOZr5EZJKcC/kWVNPL4R7GvcveQkKMgpvQUjQKRaRAtxKcuU8y07jDSkoqL8u JxcQJMwOvZNUdlSV7Nqyr8DgLXg9ddlkECERLeSlsTAXriXkbHk9PXykxhljYHtUYFnX /uMrV0U0WuZw1glcOAMHwUNIPVujxocx/ZmwSZzH9nEopUTvOtCtYla8z9vTwYau237+ SiWg== X-Gm-Message-State: ACgBeo3qLSsLAuLTLLRHWjPcbi+Qrs+8NSpIczuNwZnDt/AIfT3rzSKv JTFoW4HOGurCa5XxayIkhVMl5Q== X-Google-Smtp-Source: AA6agR7XO9/ucBfdhxeAYi9ueBa5bQI5OkfrnAcol6y9widXC8PN67prjDo2a9PO6440GhdqtBKYaQ== X-Received: by 2002:a05:600c:1d12:b0:3a5:eb79:edc3 with SMTP id l18-20020a05600c1d1200b003a5eb79edc3mr3104767wms.136.1660766750603; Wed, 17 Aug 2022 13:05:50 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id i133-20020a1c3b8b000000b003a531c7aa66sm3400883wma.1.2022.08.17.13.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 13:05:49 -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, Rob Herring Subject: [PATCH 1/4] dt-bindings: timer: sifive,clint: add legacy riscv compatible Date: Wed, 17 Aug 2022 21:05:20 +0100 Message-Id: <20220817200531.988850-2-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220817200531.988850-1-mail@conchuod.ie> References: <20220817200531.988850-1-mail@conchuod.ie> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Conor Dooley While "real" hardware might not use the compatible string "riscv,clint0" it is present in the driver & QEMU uses it for automatically generated virt machine dtbs. To avoid dt-validate problems with QEMU produced dtbs, such as the following, add it to the binding. riscv-virt.dtb: clint@2000000: compatible:0: 'sifive,clint0' is not one of = ['sifive,fu540-c000-clint', 'starfive,jh7100-clint', 'canaan,k210-clint'] Reported-by: Rob Herring Link: https://lore.kernel.org/linux-riscv/20220803170552.GA2250266-robh@ker= nel.org/ Signed-off-by: Conor Dooley --- .../bindings/timer/sifive,clint.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Do= cumentation/devicetree/bindings/timer/sifive,clint.yaml index e64f46339079..bbad24165837 100644 --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml @@ -22,12 +22,18 @@ description: =20 properties: compatible: - items: - - enum: - - sifive,fu540-c000-clint - - starfive,jh7100-clint - - canaan,k210-clint - - const: sifive,clint0 + oneOf: + - items: + - enum: + - sifive,fu540-c000-clint + - starfive,jh7100-clint + - canaan,k210-clint + - const: sifive,clint0 + - items: + - const: sifive,clint0 + - const: riscv,clint0 + deprecated: true + description: For the QEMU virt machine only =20 description: Should be ",-clint" and "sifive,clint". --=20 2.37.1 From nobody Sat Apr 11 00:44:33 2026 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 4A2A9C25B08 for ; Wed, 17 Aug 2022 20:06:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240871AbiHQUGV (ORCPT ); Wed, 17 Aug 2022 16:06:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241723AbiHQUGE (ORCPT ); Wed, 17 Aug 2022 16:06:04 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60DD85A2C7 for ; Wed, 17 Aug 2022 13:06:02 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id u14so2864702wrq.9 for ; Wed, 17 Aug 2022 13:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=1R6UrF0Wsbj6EmcSlPWRzTAwonFDames2nGAVyANWlQ=; b=AeJIiHm9h3I/Eov20f5hm9jFdNKZoOB4Jm6+CCfujHehef2vYBlAHYHSx5/YrlWtGy uwOBvhI96+/wdxcUYt/7toPQmj4t0R7CoZ7AyNypy40Yp4pB0wOibbFOUSqHZ/xHuZY+ a5AbbRHn5YtRY0D0gKPtmjm/2hkhkJrpqVZ72vi2GO26mLW9PDvv9Bybx4U6HbVZQ509 m8j1y5HSVzo5McL0PRSHDvNJfP4bGBEOmQ7YHJDmQ4AVZxCcIjWIUTSURamn6zVm0hYx tZIvcSQZwjZOSNVtG4bAxh1Ql8CBw+SvPUU8vlL66yaGZadxHsoKbpUfyorMa/vTna1L QXzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=1R6UrF0Wsbj6EmcSlPWRzTAwonFDames2nGAVyANWlQ=; b=khuJnxHYIxVHWmsNbZS4Gq9g45gonCGvlrxep+GgDBZLI7/kw4SAt7zb7xted6pW6F JW/aWgJPFgMpY63SLUXaMDch3ueAQSjiJYrPuGjUbPiqNsyJyha9SHulpypUqgDslxVE 4LKoMOLXB0NvTbxisNTD7edhGQsw1Yi60vijedX3pITQXxDdBmN8STJa2UApCGyqbMvk CNFGxWciT3FDFQhPDJVt0RfWt5QS95oI0/nNArdpvZIhinktbO8gQBS7yEt+RNtdA4x5 y9DFDODmxBb3M6VMJvl3gMzTDw7Q1X8XnWRz8UAeuEcFEKpnR11YUTFnyQ04zgFtrs93 bpkQ== X-Gm-Message-State: ACgBeo3rOnvNDHx5Qityt3AFrHCg/fcqW1zSWcBRuxfvfuLN0iUGZ1Sx tEBFK7uErtBZwjyUAMa5/Fclig== X-Google-Smtp-Source: AA6agR5ISPAA2r8H4343y7nQ1xvi4vK0fSr9VzDNPaY5Bb1ElOubBSAalLLrbPfbH95opdbBSj6WkQ== X-Received: by 2002:a5d:67c7:0:b0:225:210b:21a4 with SMTP id n7-20020a5d67c7000000b00225210b21a4mr3350305wrw.677.1660766760597; Wed, 17 Aug 2022 13:06:00 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id i133-20020a1c3b8b000000b003a531c7aa66sm3400883wma.1.2022.08.17.13.05.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 13:05:59 -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, Rob Herring Subject: [PATCH v2 1/4] dt-bindings: timer: sifive,clint: add legacy riscv compatible Date: Wed, 17 Aug 2022 21:05:25 +0100 Message-Id: <20220817200531.988850-7-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220817200531.988850-1-mail@conchuod.ie> References: <20220817200531.988850-1-mail@conchuod.ie> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Conor Dooley While "real" hardware might not use the compatible string "riscv,clint0" it is present in the driver & QEMU uses it for automatically generated virt machine dtbs. To avoid dt-validate problems with QEMU produced dtbs, such as the following, add it to the binding. riscv-virt.dtb: clint@2000000: compatible:0: 'sifive,clint0' is not one of = ['sifive,fu540-c000-clint', 'starfive,jh7100-clint', 'canaan,k210-clint'] Reported-by: Rob Herring Link: https://lore.kernel.org/linux-riscv/20220803170552.GA2250266-robh@ker= nel.org/ Signed-off-by: Conor Dooley --- .../bindings/timer/sifive,clint.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Do= cumentation/devicetree/bindings/timer/sifive,clint.yaml index e64f46339079..bbad24165837 100644 --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml @@ -22,12 +22,18 @@ description: =20 properties: compatible: - items: - - enum: - - sifive,fu540-c000-clint - - starfive,jh7100-clint - - canaan,k210-clint - - const: sifive,clint0 + oneOf: + - items: + - enum: + - sifive,fu540-c000-clint + - starfive,jh7100-clint + - canaan,k210-clint + - const: sifive,clint0 + - items: + - const: sifive,clint0 + - const: riscv,clint0 + deprecated: true + description: For the QEMU virt machine only =20 description: Should be ",-clint" and "sifive,clint". --=20 2.37.1 From nobody Sat Apr 11 00:44:33 2026 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 42382C25B08 for ; Wed, 17 Aug 2022 20:06:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241723AbiHQUGZ (ORCPT ); Wed, 17 Aug 2022 16:06:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231651AbiHQUGF (ORCPT ); Wed, 17 Aug 2022 16:06:05 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A62A45A88F for ; Wed, 17 Aug 2022 13:06:03 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id r83-20020a1c4456000000b003a5cb389944so1552461wma.4 for ; Wed, 17 Aug 2022 13:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=maIqyDhug0EL/mXAyR5nYeGttmLcfb6O/BjdQzpTa5E=; b=SvB7YEP3eBYgrsleZ9iJFkse/4XFgJLUFnZphTSo/h+JulyMrKVTZD8RO5Kg+xC5CU DeM3YEJ/7AJzDEuYTEFUS4u64EqaNwRPh8LLxU7fOu+knhpXuF1UoqLMf2vDzColvBcG l7EmjVeU4ldGrhztpHd+yPyzkjgGuYQURy1EZIMtGAO8cM/JJPCeB+60hrOrBaNrDsS6 AaVH3j6cDsNPNUKbsndY9MAU8mfFXMKGQOiukc6NDpw2gXBhTGUTW9yoLzJt/azZ3xzA 7hI0vRlX+AqEl3fe97FyADdLJ4s6F+sjgTgO0k8BTw9+Ru5FXr9VeuJ35AY6NZA3XKo3 rDDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=maIqyDhug0EL/mXAyR5nYeGttmLcfb6O/BjdQzpTa5E=; b=VP2Jbrm+jrm7jcJ37q+nOMeYHXGj9iqblkB6BbfmBTq8KHPSwh9jtxY7SK8wOde2D7 2RqZYo+e5CSf/uQYabbBOFpvKgpExDlQalJ/dSWBPi6QdQLdWXNrhxXijmwZzw8BeEgu SxXr70MFHrsMMoGqii4VGib5psYLTWP+5tahhKaY8qZE2vm9TgrjCXBYaUwRIqbUAIRn Nnpt7/lJkEl8EdONY7VWkSmmR6fk603dXfn4qBaH2Tauqs+9j8/PyPGtS0EsxDYcUC7X No1d75PpsSG+rv54UYq7XhsQYW2jq+QjtlYN9j035BVCBTYp90+V8eNVSAkMEtYa3LYK Ooyw== X-Gm-Message-State: ACgBeo2UlDWfUvReuvD7en1bzDklwb54wIOsOkP3+V4GE0JCXv+vYep6 e2qo9fewnX68/+PFnILgm7qV2A== X-Google-Smtp-Source: AA6agR69vG8ENkmh+Uqgy8Kv6cQH+ISkT39e9E6kBR+5DdZP6du68vAeHlgf+tU+DqK4XBGR6h4HRw== X-Received: by 2002:a05:600c:3b0c:b0:3a6:aa0:5966 with SMTP id m12-20020a05600c3b0c00b003a60aa05966mr3076942wms.183.1660766762106; Wed, 17 Aug 2022 13:06:02 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id i133-20020a1c3b8b000000b003a531c7aa66sm3400883wma.1.2022.08.17.13.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 13:06:01 -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, Rob Herring , Alistair Francis Subject: [PATCH v2 1/4] hw/riscv: virt: fix uart node name Date: Wed, 17 Aug 2022 21:05:26 +0100 Message-Id: <20220817200531.988850-8-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220817200531.988850-1-mail@conchuod.ie> References: <20220817200531.988850-1-mail@conchuod.ie> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Conor Dooley "uart" is not a node name that complies with the dt-schema. Change the node name to "serial" to ix warnings seen during dt-validate on a dtbdump of the virt machine such as: /stuff/qemu/qemu.dtb: uart@10000000: $nodename:0: 'uart@10000000' does not = match '^serial(@.*)?$' From schema: /stuff/linux/Documentation/devicetree/bindings/serial/= 8250.yaml Reported-by: Rob Herring Link: https://lore.kernel.org/linux-riscv/20220803170552.GA2250266-robh@ker= nel.org/ Fixes: 04331d0b56 ("RISC-V VirtIO Machine") Reviewed-by: Alistair Francis Signed-off-by: Conor Dooley --- hw/riscv/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index bc424dd2f5..6c61a406c4 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -917,7 +917,7 @@ static void create_fdt_uart(RISCVVirtState *s, const Me= mMapEntry *memmap, char *name; MachineState *mc =3D MACHINE(s); =20 - name =3D g_strdup_printf("/soc/uart@%lx", (long)memmap[VIRT_UART0].bas= e); + name =3D g_strdup_printf("/soc/serial@%lx", (long)memmap[VIRT_UART0].b= ase); qemu_fdt_add_subnode(mc->fdt, name); qemu_fdt_setprop_string(mc->fdt, name, "compatible", "ns16550a"); qemu_fdt_setprop_cells(mc->fdt, name, "reg", --=20 2.37.1 From nobody Sat Apr 11 00:44:33 2026 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 8AFE3C32772 for ; Wed, 17 Aug 2022 20:06:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241726AbiHQUGG (ORCPT ); Wed, 17 Aug 2022 16:06:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241706AbiHQUFz (ORCPT ); Wed, 17 Aug 2022 16:05:55 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4141563F14 for ; Wed, 17 Aug 2022 13:05:54 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id n4so17367519wrp.10 for ; Wed, 17 Aug 2022 13:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=vuO3cD7vHfOoM26qaFlIa3/qXvWH4JaTB3axSBEJPBw=; b=aLff/SU5U5NCprD2QuW81ZfqWPcaSFXlXSbnm3nBxoThVUuC+erRdVodWmcN79GWR3 x6K8q62Y/aYgL/FZR7jCoVAQly7asoaWMM3eg4Sn7jt91w07TL5ryQcaxYoFF6mtw7x7 WyCWzHVrw1kx1hzhuGNSQ8Z1QZLPIxrOSVAv5jzhEYz5lNvczMpa1TQU+b0Tf7qi+ALt tyUURhWEo6A/4e0QPQ+c9f7f1yX97VvMESe+aAoTJFbFqSFzjrwU8WvqNZnisdvUVt5J zfYmHcItVD5nQhI8sOUgr2pTtd/SmXdJo6yVsTj0KdxUltsCv4tc4rsYkjw0cepkFKbm LQTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=vuO3cD7vHfOoM26qaFlIa3/qXvWH4JaTB3axSBEJPBw=; b=TWucobMFoYq2d3p82IEzvT44+friI8TrckRzAZ0ZOZl5t2UH2vELGvMaIdB1t8iQdI aZgWoAA56z5mTeazivUAS113ztkjVg8A/jLyDr00vtqYBg4pshTbWORVJ9C16Bxhv1PF m2wtbPVlwgmPxqJuo7xfkLZColkS448Lw0ZVGIhM/Xtzmj9cUZE/egzYdDUe6XolpWoT EAFMOyXcpsMOVWg0gQaxke+MY7iNm8k5VcsVwVFqJahsf+LLpOeYj1JPs6Jab/F9xwrU AALa4deWrTn+6oQQDNDm/323V7DL0Kar/muq85xH/CV4QS89Q4KQDAe2ACejORvuGPuR 6XSw== X-Gm-Message-State: ACgBeo18lZxEzkQUWoFnIbgofEnQLVZfs6oY6EPgPwRBzhKAguvotUky p+DGTZK0Au9qxKPASIxKFj0hQQ== X-Google-Smtp-Source: AA6agR6xInXHiAM2BCLKV9u+fYev1yEmFG0NjjMiZhNBeLkYTbhJq4za1Z3qh97Ys5ZCdjUKqm17DQ== X-Received: by 2002:a05:6000:1b92:b0:220:7d86:2e30 with SMTP id r18-20020a0560001b9200b002207d862e30mr15678682wru.530.1660766752738; Wed, 17 Aug 2022 13:05:52 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id i133-20020a1c3b8b000000b003a531c7aa66sm3400883wma.1.2022.08.17.13.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 13:05:51 -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, Rob Herring Subject: [PATCH 2/4] dt-bindings: interrupt-controller: sifive,plic: add legacy riscv compatible Date: Wed, 17 Aug 2022 21:05:21 +0100 Message-Id: <20220817200531.988850-3-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220817200531.988850-1-mail@conchuod.ie> References: <20220817200531.988850-1-mail@conchuod.ie> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Conor Dooley While "real" hardware might not use the compatible string "riscv,plic0" it is present in the driver & QEMU uses it for automatically generated virt machine dtbs. To avoid dt-validate problems with QEMU produced dtbs, such as the following, add it to the binding. riscv-virt.dtb: plic@c000000: compatible: 'oneOf' conditional failed, one m= ust be fixed: 'sifive,plic-1.0.0' is not one of ['sifive,fu540-c000-plic', 'starf= ive,jh7100-plic', 'canaan,k210-plic'] 'sifive,plic-1.0.0' is not one of ['allwinner,sun20i-d1-plic'] 'sifive,plic-1.0.0' was expected 'thead,c900-plic' was expected riscv-virt.dtb: plic@c000000: '#address-cells' is a required property Reported-by: Rob Herring Link: https://lore.kernel.org/linux-riscv/20220803170552.GA2250266-robh@ker= nel.org/ Signed-off-by: Conor Dooley --- .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,= plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/si= five,plic-1.0.0.yaml index 92e0f8c3eff2..99e01f4d0a69 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.= 0.0.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.= 0.0.yaml @@ -66,6 +66,11 @@ properties: - enum: - allwinner,sun20i-d1-plic - const: thead,c900-plic + - items: + - const: sifive,plic-1.0.0 + - const: riscv,plic0 + deprecated: true + description: For the QEMU virt machine only =20 reg: maxItems: 1 --=20 2.37.1 From nobody Sat Apr 11 00:44:33 2026 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 1393CC2BB41 for ; Wed, 17 Aug 2022 20:06:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241520AbiHQUGQ (ORCPT ); Wed, 17 Aug 2022 16:06:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241717AbiHQUF6 (ORCPT ); Wed, 17 Aug 2022 16:05:58 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B7625A833 for ; Wed, 17 Aug 2022 13:05:56 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id bs25so17431532wrb.2 for ; Wed, 17 Aug 2022 13:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=De0s+s/D2rq5b1W85sP7P0sadpD1tyl+4KZh5xfCdFc=; b=CqamtgAe1cozn3E5KYzIR0JSvcCAa1Xfs2dPgBcx+0TIqlYpaQ31CAGtekwFrEq3/w +lY37IADJw7hcSFmTZ5af/FF/BWp/lzVufrxeKGzDhuXY3/lmzb7Y/GcUmt+NJ/1dWRF No5gZ+j+hFAHBwcOmgNIM0KteUxW83ESCVJCDvMNCkbHKNu4Fp44M0F8HZ5m4YVcrYE5 gVv1hRa6fQlU4jn/uVxGBskyzHAK1X3lsTkVsg7wg+nHs6RGCiW+b8g6A1EAMAB44MnL JLobl0GZbdVudwNjFMsjiMjZJn3PJPDXAw2MQGt1Z7ETNOFJguNN9qrdd954ctHWf0up IktQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=De0s+s/D2rq5b1W85sP7P0sadpD1tyl+4KZh5xfCdFc=; b=2kAXLhA5tFnpF/9Q9iDwxFS5fTPO3EwNTzA204VMa/J3OW1v+sbiobst2LAVddZrJZ yKqi9Ecn2xYrTQmaaOb+phfHEQwzuCz+Tn/zZqpwtTk+0mUONt/j9AO+WpPYu2awITuV vwWxNRvEeVVQ8CGsDhqAvqNrv9VS3q0Wa/Fb7mnWTopb3HCCgWGa5t7S0AOHNYOkOw9v ObmFSrLkl7edvN42HRuiq+p+E/fV7gQw4fRWa70deipmnD3XiRH/QM/ZZPmHnm+5R2qC yVTjLGBpK6zgNykDCniLtDBjT2qU05Pnjjy6Wzwkbc3PHtlnttl42sF74R8AHOOiGHmR UC1w== X-Gm-Message-State: ACgBeo0wd/1rfoIthlwWRN/qygrtOQAMsDPY9um8EWUVexuZJPloyyT3 GfUrA6PYqc+IOpAfQM+zXcUV5g== X-Google-Smtp-Source: AA6agR50pEUBEksxLhbytcIwiO8h9Uinjt+PuB3e09bA3J6AK1dzbXoEiGaehAaijDuEftMP10HEjg== X-Received: by 2002:a5d:534e:0:b0:225:2c0b:9b08 with SMTP id t14-20020a5d534e000000b002252c0b9b08mr750530wrv.136.1660766754709; Wed, 17 Aug 2022 13:05:54 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id i133-20020a1c3b8b000000b003a531c7aa66sm3400883wma.1.2022.08.17.13.05.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 13:05:53 -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, Rob Herring Subject: [PATCH 3/4] dt-bindings: riscv: add new riscv,isa strings for emulators Date: Wed, 17 Aug 2022 21:05:22 +0100 Message-Id: <20220817200531.988850-4-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220817200531.988850-1-mail@conchuod.ie> References: <20220817200531.988850-1-mail@conchuod.ie> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Conor Dooley The QEMU virt and spike machines currently export a riscv,isa string of "rv64imafdcsuh", While the RISC-V foundation has been ratifying a bunch of extenstions etc, the kernel has remained relatively static with what hardware is supported - but the same is not true of QEMU. Using the virt machine and running dt-validate on the dumped dtb fails, partly due to the unexpected isa string. Rather than enumerate the many many possbilities, change the pattern to a regex, with the following assumptions: - the single letter order is fixed & we don't care about things that can't even do "ima" - the standard multi letter extensions are all in a "_z" format where the first letter of is a valid single letter extension - _s & _h are used for supervisor and hyper visor extensions. - after the first two chars, a standard multi letter extension name could be an english word (ifencei anyone?) so it's not worth restricting the charset - vendor ISA extensions begind with _x and have no charset restrictions - we don't care about an e extension from an OS pov - that attempting to validate the contents of the multiletter extensions with dt-validate beyond the formatting is a futile, massively verbose or unwieldy exercise at best. - ima are required The following limitations also apply: - multi letter extension ordering is not enforced. dt-schema does not appear to allow for named match groups, so the resulting regex would be even more of a headache. - ditto for the numbered extensions. Finally, add me as a maintainer of the binding so that when it breaks in the future, I can be held responsible! Reported-by: Rob Herring Link: https://lore.kernel.org/linux-riscv/20220803170552.GA2250266-robh@ker= nel.org/ Signed-off-by: Conor Dooley Reviewed-by: Andrew Jones --- Palmer, feel free to drop the maintainer addition. I just mostly want to clean up my own mess on this when they decide to ratify more extensions & this comes back up again. --- Documentation/devicetree/bindings/riscv/cpus.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentat= ion/devicetree/bindings/riscv/cpus.yaml index 873dd12f6e89..c0e0bc5dce04 100644 --- a/Documentation/devicetree/bindings/riscv/cpus.yaml +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml @@ -9,6 +9,7 @@ title: RISC-V bindings for 'cpus' DT nodes maintainers: - Paul Walmsley - Palmer Dabbelt + - Conor Dooley =20 description: | This document uses some terminology common to the RISC-V community @@ -79,9 +80,7 @@ properties: insensitive, letters in the riscv,isa string must be all lowercase to simplify parsing. $ref: "/schemas/types.yaml#/definitions/string" - enum: - - rv64imac - - rv64imafdc + pattern: ^rv(?:64|32)imaf?d?q?c?b?v?k?h?(?:(?:_[zsh][imafdqcbvksh]|_x)= (?:[a-z])+)*$ =20 # RISC-V requires 'timebase-frequency' in /cpus, so disallow it here timebase-frequency: false --=20 2.37.1 From nobody Sat Apr 11 00:44:33 2026 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 4B87EC25B08 for ; Wed, 17 Aug 2022 20:06:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241735AbiHQUGM (ORCPT ); Wed, 17 Aug 2022 16:06:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241720AbiHQUF7 (ORCPT ); Wed, 17 Aug 2022 16:05:59 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1718783BF2 for ; Wed, 17 Aug 2022 13:05:58 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id j26so4913856wms.0 for ; Wed, 17 Aug 2022 13:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=MSYB9FwL7p/iJdXtPMVngWpHWItwLj/alFVUIh6RUfI=; b=aalXbJEtEyz0fdYAOCKPabkxfm+u5zzEGFKYYYxBeomEWGFk/ytTvkEEfWKdBZ9qam wwPT8nrUrsYfzpKtV1r1kCaWqWs7YknEFQ+aMuxIJu94oyoYyqccYk++TUEtq7RdJvKO MzSWpQ8GV7vEXfBNVWpGsamiURxgJnsbxc7XXf53ogih2Ou90s3e7mUu35VW3GIQCSSw JPvYuuH7VSB7jfYTR68yLcDpE1FtIEkttItkbc9J1nSS2wMYrQSwMbS4hn8f9anRfmWP 24Hrem9kUuAlsAO5ml5foFmLYM1OVh5ICRpf43152oMEX3Pn0AUq0pEnXNS1n6QB9vsm c8qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=MSYB9FwL7p/iJdXtPMVngWpHWItwLj/alFVUIh6RUfI=; b=wLWC6fBnrBdVjcm2LupbK9QN3Aa4Fveh4EkQ/+5jOhugUXSmchJeqwZ+k8Jw20qupv 7c64V1j5438erQqGcejL3cqy6NpcKpW71tOJYMJLejZWKDF+In0zq7hAHRMK12T2yy5r 2jn6F3Wmf3FVUAtoQbWCd8Y8gVEsuNnTWV206Omx2Za5LmGMLg3fi96caWzQubG7lhw3 vpt9XBX41mePlla31UWxhP48VINM/y8zg5vAbh9Ug3FyFKmFez+1+pL/Hu+LkdlD4Pyw 6ED1Hzxd0Y6qaBd5eEeD8bIF1AM6hUU/cPuZmdrh0qq4BXoTRC6TkMT67XiRmDC0LxqL LEDA== X-Gm-Message-State: ACgBeo21mBjeArdiFrKuYYK5dcSSQGmaNtuc0B98YYCdeCu+fwy3guBB cd5Nrd+ykaJGbYJVecMoGjSCJw== X-Google-Smtp-Source: AA6agR5DU5oL31YGMFMqSJ9QosyAIgz1wKmRamOx/HzSICAxr/vstQ62IK8je47MYg2BbSWSiqFh2A== X-Received: by 2002:a7b:cb88:0:b0:3a5:ea1c:c541 with SMTP id m8-20020a7bcb88000000b003a5ea1cc541mr3165264wmi.114.1660766756496; Wed, 17 Aug 2022 13:05:56 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id i133-20020a1c3b8b000000b003a531c7aa66sm3400883wma.1.2022.08.17.13.05.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 13:05:55 -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: [NOT-A-PATCH 4/4] dt-bindings: riscv: isa string bonus content Date: Wed, 17 Aug 2022 21:05:23 +0100 Message-Id: <20220817200531.988850-5-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220817200531.988850-1-mail@conchuod.ie> References: <20220817200531.988850-1-mail@conchuod.ie> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Conor Dooley **NOT FOR CONSIDERATION** I figured, sure why not add the strings for version number validation, just in case we need them in the future. The commented out string is considered by dt-schema to be "not a regex", but regex101 thinks it is... Maybe dt-schema does not support named match groups, but they are the only way that I could trivially find to make this somewhat manageable. Either way, it is permissive so it allows combinations of "M", "MpM" & no number. Not-signed-off-by: Conor Dooley --- Documentation/devicetree/bindings/riscv/cpus.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentat= ion/devicetree/bindings/riscv/cpus.yaml index c0e0bc5dce04..38a824453012 100644 --- a/Documentation/devicetree/bindings/riscv/cpus.yaml +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml @@ -80,7 +80,11 @@ properties: insensitive, letters in the riscv,isa string must be all lowercase to simplify parsing. $ref: "/schemas/types.yaml#/definitions/string" - pattern: ^rv(?:64|32)imaf?d?q?c?b?v?k?h?(?:(?:_[zsh][imafdqcbvksh]|_x)= (?:[a-z])+)*$ + oneOf: + - pattern: ^rv(?:64|32)imaf?d?q?c?b?v?k?h?(?:(?:_[zsh][imafdqcbvksh]= |_x)(?:[a-z])+)*$ + - pattern: ^rv(?:64|32)(?:i\d+)(?:m\d+)(?:a\d+)(?:f\d+)?(?:d\d+)?(?:= q\d+)?(?:c\d+)?(?:b\d+)?(?:v\d+)?(?:k\d+)?(?:h\d+)?(?:(?:_[zsh][imafdqcbvks= h]|_x)(?:[a-z])+\d+)*$ + - pattern: ^rv(?:64|32)(?:i\d+p\d+)(?:m\d+p\d+)(?:a\d+p\d+)(?:f\d+p\= d+)?(?:d\d+p\d+)?(?:q\d+p\d+)?(?:c\d+p\d+)?(?:b\d+p\d+)?(?:v\d+p\d+)?(?:k\d= +p\d+)?(?:h\d+p\d+)?(?:(?:_[zsh][imafdqcbvksh]|_x)(?:[a-z])+(?:\d+p\d+))*$ +# - pattern: ^rv(?:64|32)(?:i(?(?:\d+|\d+p\d+)?)?)(?:m(?:\k= )?)(?:a(?:\k)?)(?:f(?:\k)?)?(?:d(?:\k)?)?(?:q(?:\k)?)?(= ?:c(?:\k)?)?(?:b(?:\k)?)?(?:v(?:\k)?)?(?:k(?:\k)?)?(?:h= (?:\k)?)?(?:(?:_[zsh][imafdqcbvksh]|_x)(?:[a-z])*(?:\d+|\d+p\d+)?)+$ =20 # RISC-V requires 'timebase-frequency' in /cpus, so disallow it here timebase-frequency: false --=20 2.37.1