All of lore.kernel.org
 help / color / mirror / Atom feed
From: Conor Dooley <mail@conchuod.ie>
To: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
	Vinod Koul <vkoul@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Serge Semin <fancer.lancer@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Palmer Dabbelt <palmer@rivosinc.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Conor Dooley <conor.dooley@microchip.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Niklas Cassel <niklas.cassel@wdc.com>,
	Dillon Min <dillon.minfei@gmail.com>,
	Heng Sia <jee.heng.sia@intel.com>,
	Jose Abreu <joabreu@synopsys.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
	alsa-devel@alsa-project.org, linux-spi@vger.kernel.org,
	linux-riscv@lists.infradead.org
Subject: [PATCH v2 06/16] dt-bindings: timer: add Canaan k210 to Synopsys DesignWare timer
Date: Mon, 27 Jun 2022 20:39:54 +0100	[thread overview]
Message-ID: <20220627194003.2395484-7-mail@conchuod.ie> (raw)
In-Reply-To: <20220627194003.2395484-1-mail@conchuod.ie>

From: Conor Dooley <conor.dooley@microchip.com>

The Canaan k210 apparently has a Sysnopsys Designware timer but
according to the documentation & devicetree it has 2 interrupts rather
than the standard one. Add a custom compatible that supports the 2
interrupt configuration and falls back to the standard binding (which
is currently the one in use in the devicetree entry).

Link: https://canaan-creative.com/wp-content/uploads/2020/03/kendryte_standalone_programming_guide_20190311144158_en.pdf #Page 58
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../bindings/timer/snps,dw-apb-timer.yaml     | 28 +++++++++++++++----
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml b/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
index d33c9205a909..9a76acc7a66f 100644
--- a/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
+++ b/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
@@ -12,6 +12,9 @@ maintainers:
 properties:
   compatible:
     oneOf:
+      - items:
+          - const: canaan,k210-apb-timer
+          - const: snps,dw-apb-timer
       - const: snps,dw-apb-timer
       - enum:
           - snps,dw-apb-timer-sp
@@ -21,9 +24,6 @@ properties:
   reg:
     maxItems: 1
 
-  interrupts:
-    maxItems: 1
-
   resets:
     maxItems: 1
 
@@ -41,7 +41,23 @@ properties:
 
   clock-frequency: true
 
-additionalProperties: false
+unevaluatedProperties: false
+
+if:
+  properties:
+    compatible:
+      contains:
+        const: canaan,k210-apb-timer
+
+then:
+  properties:
+    interrupts:
+      maxItems: 2
+
+else:
+  properties:
+    interrupts:
+      maxItems: 1
 
 required:
   - compatible
@@ -60,8 +76,8 @@ oneOf:
 examples:
   - |
     timer@ffe00000 {
-      compatible = "snps,dw-apb-timer";
-      interrupts = <0 170 4>;
+      compatible = "canaan,k210-apb-timer", "snps,dw-apb-timer";
+      interrupts = <0 170 4>, <0 170 4>;
       reg = <0xffe00000 0x1000>;
       clocks = <&timer_clk>, <&timer_pclk>;
       clock-names = "timer", "pclk";
-- 
2.36.1


WARNING: multiple messages have this Message-ID (diff)
From: Conor Dooley <mail@conchuod.ie>
To: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
	Vinod Koul <vkoul@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Serge Semin <fancer.lancer@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Palmer Dabbelt <palmer@rivosinc.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Conor Dooley <conor.dooley@microchip.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Niklas Cassel <niklas.cassel@wdc.com>,
	Dillon Min <dillon.minfei@gmail.com>,
	Heng Sia <jee.heng.sia@intel.com>,
	Jose Abreu <joabreu@synopsys.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
	alsa-devel@alsa-project.org, linux-spi@vger.kernel.org,
	linux-riscv@lists.infradead.org
Subject: [PATCH v2 06/16] dt-bindings: timer: add Canaan k210 to Synopsys DesignWare timer
Date: Mon, 27 Jun 2022 20:39:54 +0100	[thread overview]
Message-ID: <20220627194003.2395484-7-mail@conchuod.ie> (raw)
In-Reply-To: <20220627194003.2395484-1-mail@conchuod.ie>

From: Conor Dooley <conor.dooley@microchip.com>

The Canaan k210 apparently has a Sysnopsys Designware timer but
according to the documentation & devicetree it has 2 interrupts rather
than the standard one. Add a custom compatible that supports the 2
interrupt configuration and falls back to the standard binding (which
is currently the one in use in the devicetree entry).

Link: https://canaan-creative.com/wp-content/uploads/2020/03/kendryte_standalone_programming_guide_20190311144158_en.pdf #Page 58
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../bindings/timer/snps,dw-apb-timer.yaml     | 28 +++++++++++++++----
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml b/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
index d33c9205a909..9a76acc7a66f 100644
--- a/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
+++ b/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
@@ -12,6 +12,9 @@ maintainers:
 properties:
   compatible:
     oneOf:
+      - items:
+          - const: canaan,k210-apb-timer
+          - const: snps,dw-apb-timer
       - const: snps,dw-apb-timer
       - enum:
           - snps,dw-apb-timer-sp
@@ -21,9 +24,6 @@ properties:
   reg:
     maxItems: 1
 
-  interrupts:
-    maxItems: 1
-
   resets:
     maxItems: 1
 
@@ -41,7 +41,23 @@ properties:
 
   clock-frequency: true
 
-additionalProperties: false
+unevaluatedProperties: false
+
+if:
+  properties:
+    compatible:
+      contains:
+        const: canaan,k210-apb-timer
+
+then:
+  properties:
+    interrupts:
+      maxItems: 2
+
+else:
+  properties:
+    interrupts:
+      maxItems: 1
 
 required:
   - compatible
@@ -60,8 +76,8 @@ oneOf:
 examples:
   - |
     timer@ffe00000 {
-      compatible = "snps,dw-apb-timer";
-      interrupts = <0 170 4>;
+      compatible = "canaan,k210-apb-timer", "snps,dw-apb-timer";
+      interrupts = <0 170 4>, <0 170 4>;
       reg = <0xffe00000 0x1000>;
       clocks = <&timer_clk>, <&timer_pclk>;
       clock-names = "timer", "pclk";
-- 
2.36.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Conor Dooley <mail@conchuod.ie>
To: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
	Vinod Koul <vkoul@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Serge Semin <fancer.lancer@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Palmer Dabbelt <palmer@rivosinc.com>
Cc: linux-riscv@lists.infradead.org,
	Niklas Cassel <niklas.cassel@wdc.com>,
	alsa-devel@alsa-project.org, Albert Ou <aou@eecs.berkeley.edu>,
	devicetree@vger.kernel.org,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	linux-kernel@vger.kernel.org, Heng Sia <jee.heng.sia@intel.com>,
	linux-spi@vger.kernel.org,
	Conor Dooley <conor.dooley@microchip.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	dri-devel@lists.freedesktop.org,
	Paul Walmsley <paul.walmsley@sifive.com>,
	dmaengine@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Dillon Min <dillon.minfei@gmail.com>,
	Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH v2 06/16] dt-bindings: timer: add Canaan k210 to Synopsys DesignWare timer
Date: Mon, 27 Jun 2022 20:39:54 +0100	[thread overview]
Message-ID: <20220627194003.2395484-7-mail@conchuod.ie> (raw)
In-Reply-To: <20220627194003.2395484-1-mail@conchuod.ie>

From: Conor Dooley <conor.dooley@microchip.com>

The Canaan k210 apparently has a Sysnopsys Designware timer but
according to the documentation & devicetree it has 2 interrupts rather
than the standard one. Add a custom compatible that supports the 2
interrupt configuration and falls back to the standard binding (which
is currently the one in use in the devicetree entry).

Link: https://canaan-creative.com/wp-content/uploads/2020/03/kendryte_standalone_programming_guide_20190311144158_en.pdf #Page 58
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../bindings/timer/snps,dw-apb-timer.yaml     | 28 +++++++++++++++----
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml b/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
index d33c9205a909..9a76acc7a66f 100644
--- a/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
+++ b/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
@@ -12,6 +12,9 @@ maintainers:
 properties:
   compatible:
     oneOf:
+      - items:
+          - const: canaan,k210-apb-timer
+          - const: snps,dw-apb-timer
       - const: snps,dw-apb-timer
       - enum:
           - snps,dw-apb-timer-sp
@@ -21,9 +24,6 @@ properties:
   reg:
     maxItems: 1
 
-  interrupts:
-    maxItems: 1
-
   resets:
     maxItems: 1
 
@@ -41,7 +41,23 @@ properties:
 
   clock-frequency: true
 
-additionalProperties: false
+unevaluatedProperties: false
+
+if:
+  properties:
+    compatible:
+      contains:
+        const: canaan,k210-apb-timer
+
+then:
+  properties:
+    interrupts:
+      maxItems: 2
+
+else:
+  properties:
+    interrupts:
+      maxItems: 1
 
 required:
   - compatible
@@ -60,8 +76,8 @@ oneOf:
 examples:
   - |
     timer@ffe00000 {
-      compatible = "snps,dw-apb-timer";
-      interrupts = <0 170 4>;
+      compatible = "canaan,k210-apb-timer", "snps,dw-apb-timer";
+      interrupts = <0 170 4>, <0 170 4>;
       reg = <0xffe00000 0x1000>;
       clocks = <&timer_clk>, <&timer_pclk>;
       clock-names = "timer", "pclk";
-- 
2.36.1


  parent reply	other threads:[~2022-06-27 19:41 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 19:39 [PATCH v2 00/16] Canaan devicetree fixes Conor Dooley
2022-06-27 19:39 ` Conor Dooley
2022-06-27 19:39 ` Conor Dooley
2022-06-27 19:39 ` [PATCH v2 01/16] dt-bindings: display: convert ilitek,ili9341.txt to dt-schema Conor Dooley
2022-06-27 19:39   ` [PATCH v2 01/16] dt-bindings: display: convert ilitek, ili9341.txt " Conor Dooley
2022-06-27 19:39   ` [PATCH v2 01/16] dt-bindings: display: convert ilitek,ili9341.txt " Conor Dooley
2022-06-28 15:00   ` Heiko Stübner
2022-06-28 15:00     ` Heiko Stübner
2022-06-28 15:00     ` [PATCH v2 01/16] dt-bindings: display: convert ilitek, ili9341.txt " Heiko Stübner
2022-06-28 15:04     ` [PATCH v2 01/16] dt-bindings: display: convert ilitek,ili9341.txt " Heiko Stübner
2022-06-28 15:04       ` Heiko Stübner
2022-06-28 15:04       ` [PATCH v2 01/16] dt-bindings: display: convert ilitek, ili9341.txt " Heiko Stübner
2022-06-28 16:49       ` [PATCH v2 01/16] dt-bindings: display: convert ilitek,ili9341.txt " Conor.Dooley
2022-06-28 16:49         ` Conor.Dooley
2022-06-28 16:49         ` [PATCH v2 01/16] dt-bindings: display: convert ilitek, ili9341.txt " Conor.Dooley
2022-06-27 19:39 ` [PATCH v2 02/16] dt-bindings: display: panel: allow ilitek,ili9341 in isolation Conor Dooley
2022-06-27 19:39   ` [PATCH v2 02/16] dt-bindings: display: panel: allow ilitek, ili9341 " Conor Dooley
2022-06-27 19:39   ` [PATCH v2 02/16] dt-bindings: display: panel: allow ilitek,ili9341 " Conor Dooley
2022-06-27 19:39 ` [PATCH v2 03/16] ASoC: dt-bindings: convert designware-i2s to dt-schema Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:39 ` [PATCH v2 04/16] spi: dt-bindings: dw-apb-ssi: update spi-{r,t}x-bus-width Conor Dooley
2022-06-27 19:39   ` [PATCH v2 04/16] spi: dt-bindings: dw-apb-ssi: update spi-{r, t}x-bus-width Conor Dooley
2022-06-27 19:39   ` [PATCH v2 04/16] spi: dt-bindings: dw-apb-ssi: update spi-{r,t}x-bus-width Conor Dooley
2022-06-27 20:21   ` Serge Semin
2022-06-27 20:21     ` Serge Semin
2022-06-27 20:21     ` Serge Semin
2022-06-28 15:26     ` Rob Herring
2022-06-28 15:26       ` Rob Herring
2022-06-28 15:26       ` Rob Herring
2022-06-27 19:39 ` [PATCH v2 05/16] dt-bindings: dma: add Canaan k210 to Synopsys DesignWare DMA Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 21:34   ` Serge Semin
2022-06-27 21:34     ` Serge Semin
2022-06-27 21:34     ` Serge Semin
2022-06-27 22:23     ` Conor.Dooley
2022-06-27 22:23       ` Conor.Dooley
2022-06-27 22:23       ` Conor.Dooley
2022-06-27 19:39 ` Conor Dooley [this message]
2022-06-27 19:39   ` [PATCH v2 06/16] dt-bindings: timer: add Canaan k210 to Synopsys DesignWare timer Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 21:13   ` Serge Semin
2022-06-27 21:13     ` Serge Semin
2022-06-27 21:13     ` Serge Semin
2022-06-27 21:18     ` Conor Dooley
2022-06-27 21:18       ` Conor Dooley
2022-06-27 21:18       ` Conor Dooley
2022-06-27 19:39 ` [PATCH v2 07/16] dt-bindings: memory-controllers: add canaan k210 sram controller Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:39 ` [PATCH v2 08/16] riscv: dts: canaan: fix the k210's memory node Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:39 ` [PATCH v2 09/16] riscv: dts: canaan: add a specific compatible for k210's dma Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:39 ` [PATCH v2 10/16] riscv: dts: canaan: add a specific compatible for k210's timers Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:39 ` [PATCH v2 11/16] riscv: dts: canaan: fix mmc node names Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:39   ` Conor Dooley
2022-06-27 19:40 ` [PATCH v2 12/16] riscv: dts: canaan: fix kd233 display spi frequency Conor Dooley
2022-06-27 19:40   ` Conor Dooley
2022-06-27 19:40   ` Conor Dooley
2022-06-27 19:40 ` [PATCH v2 13/16] riscv: dts: canaan: use custom compatible for k210 i2s Conor Dooley
2022-06-27 19:40   ` Conor Dooley
2022-06-27 19:40   ` Conor Dooley
2022-06-27 19:40 ` [PATCH v2 14/16] riscv: dts: canaan: remove spi-max-frequency from controllers Conor Dooley
2022-06-27 19:40   ` Conor Dooley
2022-06-27 19:40   ` Conor Dooley
2022-06-27 19:40 ` [PATCH v2 15/16] riscv: dts: canaan: fix bus {ranges,reg} warnings Conor Dooley
2022-06-27 19:40   ` Conor Dooley
2022-06-27 19:40   ` Conor Dooley
2022-06-27 19:40 ` [PATCH v2 16/16] riscv: dts: canaan: build all devicetress if SOC_CANAAN Conor Dooley
2022-06-27 19:40   ` Conor Dooley
2022-06-27 19:40   ` Conor Dooley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220627194003.2395484-7-mail@conchuod.ie \
    --to=mail@conchuod.ie \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=airlied@linux.ie \
    --cc=alsa-devel@alsa-project.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=broonie@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dillon.minfei@gmail.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fancer.lancer@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=jee.heng.sia@intel.com \
    --cc=joabreu@synopsys.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=niklas.cassel@wdc.com \
    --cc=palmer@dabbelt.com \
    --cc=palmer@rivosinc.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.