Message ID | 20230915072415.118100-1-wangchen20@iscas.ac.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp897621vqi; Fri, 15 Sep 2023 01:47:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNjsg7dHcRfgXSY9ofgb/o1vpq90I4fZilnWU1mPaazEXNbnb0P1f8f+saZ8pXU3OottnE X-Received: by 2002:a05:6358:290b:b0:139:9dda:8344 with SMTP id y11-20020a056358290b00b001399dda8344mr1599207rwb.19.1694767627900; Fri, 15 Sep 2023 01:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694767627; cv=none; d=google.com; s=arc-20160816; b=TroRH1r4LRh19WBHujwB/VxC6xM6MLs/LWuiOGEO0DJM4xHRh5TiZgPcphlpDNQfGq q1H+aoS6tBZl/wqlQTI7tLECRunAR/cdK4TfFQBh8u9KLA7yWWKpLuR0NFjWTIjd3MjY vXHFQNSIwpIMo18oKVG5XgvLByAobKChmxm71p03ND9vsDJxtSEPaMbSJgTrsC6pDW+S h2sDeKDjxT+PeMfyqQTZ1Mgeh2KFlL4q6SEmMlHufLt+g4FvzlWnzVuxfTnYJPveQgCo h68ezZVtmJ4bJfl1QzWYshRUuUnjn81PMiWw3IoDKTCDWrGky/QVYq4j4+YpCpWh18Uo Q72g== 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:date:subject:cc:to:from:dkim-signature; bh=FJzMSRsFGWXl1x3CI8KZnuJ0K/8zXSh3L5yWA+KvyC4=; fh=SoHMjjwKbOCJHkpPAb6ApbQYGCkORo5QgFo6HIEqHyk=; b=eSwVlH2dKBnbt2LyGEAIAiaItRpc2QUfpz93zGxYsCAviudzCYigqxYc17gI3TtN+8 o8BjES/Q/sFq3EVOpjoBxnykz3Pgsqegjqib51h2POkoGhwJqLZ4OlxPWyQFEolJdcbd w6Spms1mCwi8jJMrnQcak8MfjxuKbDNhff6O6ezQeWRUJfXtY9CFuEIlyvO17IrJN+1b s81qhX9x/WLfbgHn8jg4vhfBDGCic/SYOd7bQ3Z7/lwGGBQjuNVqwo9qyYxPYp/UFKny bJ9vPK2NwVYCSeIJKTMSFC7zpY3OXdr0CdS6SN+flkc43JRvc52+N1npU5XWvIG2CBez dEyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=H36TSCYr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id e15-20020a6558cf000000b0055c8ad484a1si2948584pgu.125.2023.09.15.01.47.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 01:47:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=H36TSCYr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 8C87E82CED08; Fri, 15 Sep 2023 00:24:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232666AbjIOHYd (ORCPT <rfc822;pwkd43@gmail.com> + 33 others); Fri, 15 Sep 2023 03:24:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232618AbjIOHYb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 15 Sep 2023 03:24:31 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E647173B; Fri, 15 Sep 2023 00:24:26 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-26f38171174so1461209a91.3; Fri, 15 Sep 2023 00:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694762665; x=1695367465; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FJzMSRsFGWXl1x3CI8KZnuJ0K/8zXSh3L5yWA+KvyC4=; b=H36TSCYru5Nyi993We+I5CLzV28MSNbyjlTVMteZVLyaQrgndIdaWvao2kOaaQLQuO JdTtm/KnceqkJdXcL5LUPfNKNoG8qBrdYk8gXoVYyuafWm7MH0KHLYYUiHx98twwEiC9 zha07xfsaMtYmGGEBs1qhSVO/gLmpD8eIQlfN5rrknhEETJhFEXE+YdeEehGaiFmu1UP vpgB7enaxWAPPoG7uGbKhvYrDwkSgMQFgG9DZLtktdWwVBLeeofEVyDHx1gd6LRj0atZ 7+lvTlWQirXUwIUyXwkVQbTW0As9vc4UNaKz6w+LFgV4oZA1g3NMHT17aPrR+OEt2JGC fINg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694762665; x=1695367465; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FJzMSRsFGWXl1x3CI8KZnuJ0K/8zXSh3L5yWA+KvyC4=; b=NwvJu15/AhwnMegxiB9jjtx/916FKAq09x+RSo481fa99cwQqCnGWheK/vSQYyyDRo aB1JeytdEQFSxRMAPi3OSddc9FuVtJMmBs0XPgO3n3hNWB6V2BQ5hnsZpIDv46X+UQI0 Nks4ABZyuGZI52nx0m6kW0vtsUbrfjCFO4u0EhbpVxdXHJIEksH/W8thjPQfGO9y6GEF XmI24uvzLSUfd4YRFajgu716EYTi+FbwzncynpRe5fn0Bhkh8ABycs3CuzcgRuw4WWyM 513VF7Ci3A0+o0iXl0UeoDQppIL2a/TMwE6jLgEIEaMvP4h7RjQ8RviXtjyYh4cA5Dhk YiLg== X-Gm-Message-State: AOJu0YwA5QItpzyQ8gupIw4i71viwUoMPNuQnb++MSYXzlKrTTd+kUCW YF/51A/h7SjGH6ldbepZn8g= X-Received: by 2002:a17:90b:4a0d:b0:274:862f:3433 with SMTP id kk13-20020a17090b4a0d00b00274862f3433mr656664pjb.18.1694762665416; Fri, 15 Sep 2023 00:24:25 -0700 (PDT) Received: from localhost.localdomain ([222.95.63.58]) by smtp.gmail.com with ESMTPSA id 8-20020a17090a004800b0026b420ae167sm4590589pjb.17.2023.09.15.00.24.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 00:24:25 -0700 (PDT) From: Wang Chen <unicornxw@gmail.com> X-Google-Original-From: Wang Chen <wangchen20@iscas.ac.cn> To: linux-riscv@lists.infradead.org, conor@kernel.org, aou@eecs.berkeley.edu, krzysztof.kozlowski+dt@linaro.org, palmer@dabbelt.com, paul.walmsley@sifive.com, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, jszhang@kernel.org, guoren@kernel.org, chao.wei@sophgo.com, xiaoguang.xing@sophgo.com, Inochi Amaoto <inochiama@outlook.com> Subject: [PATCH 06/12] dt-bindings: timer: Add Sophgo sg2042 clint Date: Fri, 15 Sep 2023 15:24:15 +0800 Message-Id: <20230915072415.118100-1-wangchen20@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 15 Sep 2023 00:24:38 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777092660387589057 X-GMAIL-MSGID: 1777092660387589057 |
Series |
[01/12] riscv: Add SOPHGO SOC family Kconfig support
|
|
Commit Message
Chen Wang
Sept. 15, 2023, 7:24 a.m. UTC
From: Inochi Amaoto <inochiama@outlook.com> The timer and ipi(mswi) of sg2042 are on different addresses. With the same compatible string, this will cause a mismatch when is processed by SBI. Add two new compatible string formatted like `C9xx-clint-xxx` to identify the timer and ipi device separately, and do not allow c900-clint as the fallback to avoid conflict. Signed-off-by: Inochi Amaoto <inochiama@outlook.com> --- .../bindings/timer/sifive,clint.yaml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+)
Comments
On 15/09/2023 09:24, Wang Chen wrote: > From: Inochi Amaoto <inochiama@outlook.com> > > The timer and ipi(mswi) of sg2042 are on different addresses. With the > same compatible string, this will cause a mismatch when is processed by > SBI. No, same devices (obviously on different addresses) with same programming interface have *the same compatible*. > > Add two new compatible string formatted like `C9xx-clint-xxx` to identify > the timer and ipi device separately, and do not allow c900-clint as the > fallback to avoid conflict. > > Signed-off-by: Inochi Amaoto <inochiama@outlook.com> > --- > .../bindings/timer/sifive,clint.yaml | 26 +++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml > index a0185e15a42f..2a86b80c3f1e 100644 > --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml > +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml > @@ -39,6 +39,14 @@ properties: > - allwinner,sun20i-d1-clint > - thead,th1520-clint > - const: thead,c900-clint > + - items: > + - enum: > + - sophgo,sg2042-clint-mtimer > + - const: thead,c900-clint-mtimer > + - items: > + - enum: > + - sophgo,sg2042-clint-mswi > + - const: thead,c900-clint-mswi > - items: > - const: sifive,clint0 > - const: riscv,clint0 > @@ -74,4 +82,22 @@ examples: > <&cpu4intc 3>, <&cpu4intc 7>; > reg = <0x2000000 0x10000>; > }; > + - | > + clint-mtimer@ac010000 { > + compatible = "sophgo,sg2042-clint-mtimer", "thead,c900-clint-mtimer"; > + interrupts-extended = <&cpu1intc 7>, > + <&cpu2intc 7>, > + <&cpu3intc 7>, > + <&cpu4intc 7>; > + reg = <0xac010000 0x00007ff8>; Drop example, not needed. > + }; > + - | > + clint-mswi@94000000 { > + compatible = "sophgo,sg2042-clint-mswi", "thead,c900-clint-mswi"; > + interrupts-extended = <&cpu1intc 3>, > + <&cpu2intc 3>, > + <&cpu3intc 3>, > + <&cpu4intc 3>; > + reg = <0x94000000 0x00004000>; Drop example, not needed. > + }; > ... Best regards, Krzysztof
On Fri, Sep 15, 2023 at 03:24:15PM +0800, Wang Chen wrote: > From: Inochi Amaoto <inochiama@outlook.com> > > The timer and ipi(mswi) of sg2042 are on different addresses. With the > same compatible string, this will cause a mismatch when is processed by > SBI. > > Add two new compatible string formatted like `C9xx-clint-xxx` to identify > the timer and ipi device separately, and do not allow c900-clint as the > fallback to avoid conflict. > > Signed-off-by: Inochi Amaoto <inochiama@outlook.com> Missing your S-o-b as any patch you send should have yours (last). > --- > .../bindings/timer/sifive,clint.yaml | 26 +++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml > index a0185e15a42f..2a86b80c3f1e 100644 > --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml > +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml > @@ -39,6 +39,14 @@ properties: > - allwinner,sun20i-d1-clint > - thead,th1520-clint > - const: thead,c900-clint > + - items: > + - enum: > + - sophgo,sg2042-clint-mtimer > + - const: thead,c900-clint-mtimer > + - items: > + - enum: > + - sophgo,sg2042-clint-mswi > + - const: thead,c900-clint-mswi > - items: > - const: sifive,clint0 > - const: riscv,clint0 > @@ -74,4 +82,22 @@ examples: > <&cpu4intc 3>, <&cpu4intc 7>; > reg = <0x2000000 0x10000>; > }; > + - | > + clint-mtimer@ac010000 { > + compatible = "sophgo,sg2042-clint-mtimer", "thead,c900-clint-mtimer"; > + interrupts-extended = <&cpu1intc 7>, > + <&cpu2intc 7>, > + <&cpu3intc 7>, > + <&cpu4intc 7>; > + reg = <0xac010000 0x00007ff8>; > + }; > + - | > + clint-mswi@94000000 { > + compatible = "sophgo,sg2042-clint-mswi", "thead,c900-clint-mswi"; > + interrupts-extended = <&cpu1intc 3>, > + <&cpu2intc 3>, > + <&cpu3intc 3>, > + <&cpu4intc 3>; > + reg = <0x94000000 0x00004000>; > + }; > ... > -- > 2.25.1 >
diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml index a0185e15a42f..2a86b80c3f1e 100644 --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml @@ -39,6 +39,14 @@ properties: - allwinner,sun20i-d1-clint - thead,th1520-clint - const: thead,c900-clint + - items: + - enum: + - sophgo,sg2042-clint-mtimer + - const: thead,c900-clint-mtimer + - items: + - enum: + - sophgo,sg2042-clint-mswi + - const: thead,c900-clint-mswi - items: - const: sifive,clint0 - const: riscv,clint0 @@ -74,4 +82,22 @@ examples: <&cpu4intc 3>, <&cpu4intc 7>; reg = <0x2000000 0x10000>; }; + - | + clint-mtimer@ac010000 { + compatible = "sophgo,sg2042-clint-mtimer", "thead,c900-clint-mtimer"; + interrupts-extended = <&cpu1intc 7>, + <&cpu2intc 7>, + <&cpu3intc 7>, + <&cpu4intc 7>; + reg = <0xac010000 0x00007ff8>; + }; + - | + clint-mswi@94000000 { + compatible = "sophgo,sg2042-clint-mswi", "thead,c900-clint-mswi"; + interrupts-extended = <&cpu1intc 3>, + <&cpu2intc 3>, + <&cpu3intc 3>, + <&cpu4intc 3>; + reg = <0x94000000 0x00004000>; + }; ...