linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/8] dt-bindings: watchdog: realtek: Convert RTD119x to schema
       [not found] <20191020040817.16882-1-afaerber@suse.de>
@ 2019-10-20  4:08 ` Andreas Färber
  2019-10-25 21:16   ` Rob Herring
  2019-10-20  4:08 ` [PATCH v2 2/8] dt-bindings: rtc: " Andreas Färber
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: Andreas Färber @ 2019-10-20  4:08 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: linux-arm-kernel, Andreas Färber, Wim Van Sebroeck,
	Guenter Roeck, Rob Herring, Mark Rutland, linux-watchdog,
	devicetree, linux-kernel

Convert the Realtek watchdog binding to a YAML schema.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v2: New
 
 .../bindings/watchdog/realtek,rtd119x.txt          | 17 ----------
 .../bindings/watchdog/realtek,rtd119x.yaml         | 38 ++++++++++++++++++++++
 2 files changed, 38 insertions(+), 17 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/realtek,rtd119x.yaml

diff --git a/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt b/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt
deleted file mode 100644
index 05653054bd5b..000000000000
--- a/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Realtek RTD1295 Watchdog
-========================
-
-Required properties:
-
-- compatible :  Should be "realtek,rtd1295-watchdog"
-- reg        :  Specifies the physical base address and size of registers
-- clocks     :  Specifies one clock input
-
-
-Example:
-
-	watchdog@98007680 {
-		compatible = "realtek,rtd1295-watchdog";
-		reg = <0x98007680 0x100>;
-		clocks = <&osc27M>;
-	};
diff --git a/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.yaml b/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.yaml
new file mode 100644
index 000000000000..5d92cfdfd046
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/watchdog/realtek,rtd119x.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Realtek RTD1295 Watchdog
+
+maintainers:
+  - Andreas Färber <afaerber@suse.de>
+
+allOf:
+  - $ref: watchdog.yaml#
+
+properties:
+  compatible:
+    oneOf:
+      - const: realtek,rtd1295-watchdog
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+
+examples:
+  - |
+	watchdog@98007680 {
+		compatible = "realtek,rtd1295-watchdog";
+		reg = <0x98007680 0x100>;
+		clocks = <&osc27M>;
+	};
+...
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 2/8] dt-bindings: rtc: realtek: Convert RTD119x to schema
       [not found] <20191020040817.16882-1-afaerber@suse.de>
  2019-10-20  4:08 ` [PATCH v2 1/8] dt-bindings: watchdog: realtek: Convert RTD119x to schema Andreas Färber
@ 2019-10-20  4:08 ` Andreas Färber
  2019-10-25 21:20   ` Rob Herring
  2019-10-20  4:08 ` [PATCH v2 3/8] dt-bindings: arm: realtek: Tidy up conversion to json-schema Andreas Färber
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: Andreas Färber @ 2019-10-20  4:08 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: linux-arm-kernel, Andreas Färber, Alessandro Zummo,
	Alexandre Belloni, Rob Herring, Mark Rutland, linux-rtc,
	devicetree, linux-kernel

Convert the RTD119x binding to a YAML schema.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v2: New
 
 .../devicetree/bindings/rtc/realtek,rtd119x.txt    | 16 ---------
 .../devicetree/bindings/rtc/realtek,rtd119x.yaml   | 38 ++++++++++++++++++++++
 2 files changed, 38 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml

diff --git a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
deleted file mode 100644
index bbf1ccb5df31..000000000000
--- a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Realtek RTD129x Real-Time Clock
-===============================
-
-Required properties:
-- compatible :  Should be "realtek,rtd1295-rtc"
-- reg        :  Specifies the physical base address and size
-- clocks     :  Specifies the clock gate
-
-
-Example:
-
-	rtc@9801b600 {
-		compatible = "realtek,rtd1295-clk";
-		reg = <0x9801b600 0x100>;
-		clocks = <&clkc RTD1295_CLK_EN_MISC_RTC>;
-	};
diff --git a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
new file mode 100644
index 000000000000..71b7396bd469
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/realtek,rtd119x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek RTD129x Real-Time Clock
+
+allOf:
+  - $ref: "rtc.yaml#"
+
+maintainers:
+  - Andreas Färber <afaerber@suse.de>
+
+properties:
+  compatible:
+    const: realtek,rtd1295-rtc
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+    description: Specifies the clock gate
+
+required:
+  - compatible
+  - reg
+  - clocks
+
+examples:
+  - |
+	rtc@9801b600 {
+		compatible = "realtek,rtd1295-clk";
+		reg = <0x9801b600 0x100>;
+		clocks = <&clkc RTD1295_CLK_EN_MISC_RTC>;
+	};
+...
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 3/8] dt-bindings: arm: realtek: Tidy up conversion to json-schema
       [not found] <20191020040817.16882-1-afaerber@suse.de>
  2019-10-20  4:08 ` [PATCH v2 1/8] dt-bindings: watchdog: realtek: Convert RTD119x to schema Andreas Färber
  2019-10-20  4:08 ` [PATCH v2 2/8] dt-bindings: rtc: " Andreas Färber
@ 2019-10-20  4:08 ` Andreas Färber
  2019-10-25 21:21   ` Rob Herring
  2019-10-20  4:08 ` [PATCH v2 4/8] dt-bindings: arm: realtek: Document RTD1293 and Synology DS418j Andreas Färber
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: Andreas Färber @ 2019-10-20  4:08 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: linux-arm-kernel, Andreas Färber, Rob Herring, Mark Rutland,
	devicetree, linux-kernel

Restore the device names for compatible strings as comments.
Prepare for adding more SoCs by inserting oneOf.

Fixes: 693af5f3eeaa ("dt-bindings: arm: Convert Realtek board/soc bindings to json-schema")
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v2: New
 
 Documentation/devicetree/bindings/arm/realtek.yaml | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/realtek.yaml b/Documentation/devicetree/bindings/arm/realtek.yaml
index 3528b61963b4..66458a3f422d 100644
--- a/Documentation/devicetree/bindings/arm/realtek.yaml
+++ b/Documentation/devicetree/bindings/arm/realtek.yaml
@@ -13,11 +13,12 @@ properties:
   $nodename:
     const: '/'
   compatible:
-    # RTD1295 SoC based boards
-    items:
-      - enum:
-          - mele,v9
-          - probox2,ava
-          - zidoo,x9s
-      - const: realtek,rtd1295
+    oneOf:
+      # RTD1295 SoC based boards
+      - items:
+          - enum:
+              - mele,v9 # MeLE V9
+              - probox2,ava # ProBox2 AVA
+              - zidoo,x9s # Zidoo X9S
+          - const: realtek,rtd1295
 ...
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 4/8] dt-bindings: arm: realtek: Document RTD1293 and Synology DS418j
       [not found] <20191020040817.16882-1-afaerber@suse.de>
                   ` (2 preceding siblings ...)
  2019-10-20  4:08 ` [PATCH v2 3/8] dt-bindings: arm: realtek: Tidy up conversion to json-schema Andreas Färber
@ 2019-10-20  4:08 ` Andreas Färber
  2019-10-29  4:31   ` Andreas Färber
  2019-10-20  4:08 ` [PATCH v2 5/8] arm64: dts: realtek: Change dual-license from MIT to BSD Andreas Färber
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: Andreas Färber @ 2019-10-20  4:08 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: linux-arm-kernel, Andreas Färber, info, Rob Herring,
	Mark Rutland, devicetree, linux-kernel

Define compatible strings for Realtek RTD1293 SoC and Synology
DiskStation DS418j NAS.

Cc: info@synology.com
Acked-by: Rob Herring <robh@kernel.org>
[AF: Converted to json-schema]
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v1 -> v2:
 * Converted to YAML schema
 
 Documentation/devicetree/bindings/arm/realtek.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/realtek.yaml b/Documentation/devicetree/bindings/arm/realtek.yaml
index 66458a3f422d..6ea3a79825cc 100644
--- a/Documentation/devicetree/bindings/arm/realtek.yaml
+++ b/Documentation/devicetree/bindings/arm/realtek.yaml
@@ -14,6 +14,12 @@ properties:
     const: '/'
   compatible:
     oneOf:
+      # RTD1293 SoC based boards
+      - items:
+          - enum:
+              - synology,ds418j # Synology DiskStation DS418j
+          - const: realtek,rtd1293
+
       # RTD1295 SoC based boards
       - items:
           - enum:
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 5/8] arm64: dts: realtek: Change dual-license from MIT to BSD
       [not found] <20191020040817.16882-1-afaerber@suse.de>
                   ` (3 preceding siblings ...)
  2019-10-20  4:08 ` [PATCH v2 4/8] dt-bindings: arm: realtek: Document RTD1293 and Synology DS418j Andreas Färber
@ 2019-10-20  4:08 ` Andreas Färber
  2019-10-25 20:52   ` Rob Herring
  2019-10-20  4:08 ` [PATCH v2 6/8] arm64: dts: realtek: Add RTD1293 and Synology DS418j Andreas Färber
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 22+ messages in thread
From: Andreas Färber @ 2019-10-20  4:08 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: linux-arm-kernel, Andreas Färber, Rob Herring, Rob Herring,
	Mark Rutland, devicetree, linux-kernel

Move the SPDX-License-Identifier to the top line and update to SPDX 2.0.
While at it, switch from GPLv2+/MIT to GPLv2+/BSD2c before adding more.

Suggested-by: Rob Herring <robh@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v2: New
 
 arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts | 3 +--
 arch/arm64/boot/dts/realtek/rtd1295.dtsi          | 3 +--
 arch/arm64/boot/dts/realtek/rtd129x.dtsi          | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts b/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts
index da19faab29d5..e98e508b9514 100644
--- a/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts
+++ b/arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
 /*
  * Copyright (c) 2016-2017 Andreas Färber
- *
- * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/realtek/rtd1295.dtsi b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
index 41d7858da826..93f0e1d97721 100644
--- a/arch/arm64/boot/dts/realtek/rtd1295.dtsi
+++ b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
 /*
  * Realtek RTD1295 SoC
  *
  * Copyright (c) 2016-2017 Andreas Färber
- *
- * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  */
 
 #include "rtd129x.dtsi"
diff --git a/arch/arm64/boot/dts/realtek/rtd129x.dtsi b/arch/arm64/boot/dts/realtek/rtd129x.dtsi
index b9cb92466fc7..a26c375ee1bb 100644
--- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi
+++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
 /*
  * Realtek RTD1293/RTD1295/RTD1296 SoC
  *
  * Copyright (c) 2016-2017 Andreas Färber
- *
- * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  */
 
 /memreserve/	0x0000000000000000 0x0000000000030000;
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 6/8] arm64: dts: realtek: Add RTD1293 and Synology DS418j
       [not found] <20191020040817.16882-1-afaerber@suse.de>
                   ` (4 preceding siblings ...)
  2019-10-20  4:08 ` [PATCH v2 5/8] arm64: dts: realtek: Change dual-license from MIT to BSD Andreas Färber
@ 2019-10-20  4:08 ` Andreas Färber
  2019-10-29  4:40   ` Andreas Färber
  2019-10-20  4:08 ` [PATCH v2 7/8] dt-bindings: arm: realtek: Document RTD1296 and Synology DS418 Andreas Färber
  2019-10-20  4:08 ` [PATCH v2 8/8] arm64: dts: realtek: Add " Andreas Färber
  7 siblings, 1 reply; 22+ messages in thread
From: Andreas Färber @ 2019-10-20  4:08 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: linux-arm-kernel, Andreas Färber, info, Rob Herring,
	Mark Rutland, devicetree, linux-kernel

Add Device Trees for RTD1293 SoC and Synology DiskStation DS418j NAS.

Cc: info@synology.com
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v1 -> v2:
 * Moved SPDX-License-Identifier to top
 * Dropped "arm,armv8" (Rob)
 * Changed from MIT to BSD-2-Clause (Rob)
 * Dropped accidental enable-method and cpu-release-addr
 
 arch/arm64/boot/dts/realtek/Makefile           |  3 ++
 arch/arm64/boot/dts/realtek/rtd1293-ds418j.dts | 30 +++++++++++++++
 arch/arm64/boot/dts/realtek/rtd1293.dtsi       | 51 ++++++++++++++++++++++++++
 3 files changed, 84 insertions(+)
 create mode 100644 arch/arm64/boot/dts/realtek/rtd1293-ds418j.dts
 create mode 100644 arch/arm64/boot/dts/realtek/rtd1293.dtsi

diff --git a/arch/arm64/boot/dts/realtek/Makefile b/arch/arm64/boot/dts/realtek/Makefile
index 90c897ac3f7a..e7ff40461ddc 100644
--- a/arch/arm64/boot/dts/realtek/Makefile
+++ b/arch/arm64/boot/dts/realtek/Makefile
@@ -1,4 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
+
+dtb-$(CONFIG_ARCH_REALTEK) += rtd1293-ds418j.dtb
+
 dtb-$(CONFIG_ARCH_REALTEK) += rtd1295-mele-v9.dtb
 dtb-$(CONFIG_ARCH_REALTEK) += rtd1295-probox2-ava.dtb
 dtb-$(CONFIG_ARCH_REALTEK) += rtd1295-zidoo-x9s.dtb
diff --git a/arch/arm64/boot/dts/realtek/rtd1293-ds418j.dts b/arch/arm64/boot/dts/realtek/rtd1293-ds418j.dts
new file mode 100644
index 000000000000..b2dd583146b4
--- /dev/null
+++ b/arch/arm64/boot/dts/realtek/rtd1293-ds418j.dts
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
+/*
+ * Copyright (c) 2017 Andreas Färber
+ */
+
+/dts-v1/;
+
+#include "rtd1293.dtsi"
+
+/ {
+	compatible = "synology,ds418j", "realtek,rtd1293";
+	model = "Synology DiskStation DS418j";
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0x0 0x40000000>;
+	};
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/realtek/rtd1293.dtsi b/arch/arm64/boot/dts/realtek/rtd1293.dtsi
new file mode 100644
index 000000000000..bd4e22723f7b
--- /dev/null
+++ b/arch/arm64/boot/dts/realtek/rtd1293.dtsi
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
+/*
+ * Realtek RTD1293 SoC
+ *
+ * Copyright (c) 2017-2019 Andreas Färber
+ */
+
+#include "rtd129x.dtsi"
+
+/ {
+	compatible = "realtek,rtd1293";
+
+	cpus {
+		#address-cells = <2>;
+		#size-cells = <0>;
+
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0 0x0>;
+			next-level-cache = <&l2>;
+		};
+
+		cpu1: cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0 0x1>;
+			next-level-cache = <&l2>;
+		};
+
+		l2: l2-cache {
+			compatible = "cache";
+		};
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 13
+			(GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 14
+			(GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 11
+			(GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 10
+			(GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>;
+	};
+};
+
+&arm_pmu {
+	interrupt-affinity = <&cpu0>, <&cpu1>;
+};
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 7/8] dt-bindings: arm: realtek: Document RTD1296 and Synology DS418
       [not found] <20191020040817.16882-1-afaerber@suse.de>
                   ` (5 preceding siblings ...)
  2019-10-20  4:08 ` [PATCH v2 6/8] arm64: dts: realtek: Add RTD1293 and Synology DS418j Andreas Färber
@ 2019-10-20  4:08 ` Andreas Färber
  2019-10-29  4:40   ` Andreas Färber
  2019-10-20  4:08 ` [PATCH v2 8/8] arm64: dts: realtek: Add " Andreas Färber
  7 siblings, 1 reply; 22+ messages in thread
From: Andreas Färber @ 2019-10-20  4:08 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: linux-arm-kernel, Andreas Färber, info, Rob Herring,
	Mark Rutland, devicetree, linux-kernel

Define compatible strings for Realtek RTD1296 SoC and Synology
DiskStation DS418 NAS.

Cc: info@synology.com
Acked-by: Rob Herring <robh@kernel.org>
[AF: Converted to json-schema]
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v1 -> v2:
 * Converted to YAML schema
 
 Documentation/devicetree/bindings/arm/realtek.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/realtek.yaml b/Documentation/devicetree/bindings/arm/realtek.yaml
index 6ea3a79825cc..ab59de17152d 100644
--- a/Documentation/devicetree/bindings/arm/realtek.yaml
+++ b/Documentation/devicetree/bindings/arm/realtek.yaml
@@ -27,4 +27,10 @@ properties:
               - probox2,ava # ProBox2 AVA
               - zidoo,x9s # Zidoo X9S
           - const: realtek,rtd1295
+
+      # RTD1296 SoC based boards
+      - items:
+          - enum:
+              - synology,ds418 # Synology DiskStation DS418
+          - const: realtek,rtd1296
 ...
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 8/8] arm64: dts: realtek: Add RTD1296 and Synology DS418
       [not found] <20191020040817.16882-1-afaerber@suse.de>
                   ` (6 preceding siblings ...)
  2019-10-20  4:08 ` [PATCH v2 7/8] dt-bindings: arm: realtek: Document RTD1296 and Synology DS418 Andreas Färber
@ 2019-10-20  4:08 ` Andreas Färber
  2019-10-29  4:41   ` Andreas Färber
  7 siblings, 1 reply; 22+ messages in thread
From: Andreas Färber @ 2019-10-20  4:08 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: linux-arm-kernel, Andreas Färber, info, Rob Herring,
	Mark Rutland, devicetree, linux-kernel

Add Device Trees for RTD1296 SoC and Synology DiskStation DS418.

Cc: info@synology.com
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v1 -> v2:
 * Moved SPDX-License-Identifier to top
 * Dropped "arm,armv8" (Rob)
 * Changed from MIT to BSD-2-Clause (Rob)
 * Dropped accidental enable-method and cpu-release-addr
 * Fixed DS418 to use rtd1296.dtsi
 
 arch/arm64/boot/dts/realtek/Makefile          |  2 +
 arch/arm64/boot/dts/realtek/rtd1296-ds418.dts | 30 +++++++++++++
 arch/arm64/boot/dts/realtek/rtd1296.dtsi      | 65 +++++++++++++++++++++++++++
 3 files changed, 97 insertions(+)
 create mode 100644 arch/arm64/boot/dts/realtek/rtd1296-ds418.dts
 create mode 100644 arch/arm64/boot/dts/realtek/rtd1296.dtsi

diff --git a/arch/arm64/boot/dts/realtek/Makefile b/arch/arm64/boot/dts/realtek/Makefile
index e7ff40461ddc..555638ada721 100644
--- a/arch/arm64/boot/dts/realtek/Makefile
+++ b/arch/arm64/boot/dts/realtek/Makefile
@@ -5,3 +5,5 @@ dtb-$(CONFIG_ARCH_REALTEK) += rtd1293-ds418j.dtb
 dtb-$(CONFIG_ARCH_REALTEK) += rtd1295-mele-v9.dtb
 dtb-$(CONFIG_ARCH_REALTEK) += rtd1295-probox2-ava.dtb
 dtb-$(CONFIG_ARCH_REALTEK) += rtd1295-zidoo-x9s.dtb
+
+dtb-$(CONFIG_ARCH_REALTEK) += rtd1296-ds418.dtb
diff --git a/arch/arm64/boot/dts/realtek/rtd1296-ds418.dts b/arch/arm64/boot/dts/realtek/rtd1296-ds418.dts
new file mode 100644
index 000000000000..5a051a52bf88
--- /dev/null
+++ b/arch/arm64/boot/dts/realtek/rtd1296-ds418.dts
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
+/*
+ * Copyright (c) 2017-2019 Andreas Färber
+ */
+
+/dts-v1/;
+
+#include "rtd1296.dtsi"
+
+/ {
+	compatible = "synology,ds418", "realtek,rtd1296";
+	model = "Synology DiskStation DS418";
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0x0 0x80000000>;
+	};
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/realtek/rtd1296.dtsi b/arch/arm64/boot/dts/realtek/rtd1296.dtsi
new file mode 100644
index 000000000000..0f9e59cac086
--- /dev/null
+++ b/arch/arm64/boot/dts/realtek/rtd1296.dtsi
@@ -0,0 +1,65 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
+/*
+ * Realtek RTD1296 SoC
+ *
+ * Copyright (c) 2017-2019 Andreas Färber
+ */
+
+#include "rtd129x.dtsi"
+
+/ {
+	compatible = "realtek,rtd1296";
+
+	cpus {
+		#address-cells = <2>;
+		#size-cells = <0>;
+
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0 0x0>;
+			next-level-cache = <&l2>;
+		};
+
+		cpu1: cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0 0x1>;
+			next-level-cache = <&l2>;
+		};
+
+		cpu2: cpu@2 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0 0x2>;
+			next-level-cache = <&l2>;
+		};
+
+		cpu3: cpu@3 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0 0x3>;
+			next-level-cache = <&l2>;
+		};
+
+		l2: l2-cache {
+			compatible = "cache";
+		};
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 13
+			(GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 14
+			(GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 11
+			(GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 10
+			(GIC_CPU_MASK_RAW(0xf) | IRQ_TYPE_LEVEL_LOW)>;
+	};
+};
+
+&arm_pmu {
+	interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
+};
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 5/8] arm64: dts: realtek: Change dual-license from MIT to BSD
  2019-10-20  4:08 ` [PATCH v2 5/8] arm64: dts: realtek: Change dual-license from MIT to BSD Andreas Färber
@ 2019-10-25 20:52   ` Rob Herring
  2019-10-29  4:39     ` Andreas Färber
  0 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2019-10-25 20:52 UTC (permalink / raw)
  To: Andreas Färber
  Cc: linux-realtek-soc,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Mark Rutland, devicetree, linux-kernel

On Sat, Oct 19, 2019 at 11:08 PM Andreas Färber <afaerber@suse.de> wrote:
>
> Move the SPDX-License-Identifier to the top line and update to SPDX 2.0.
> While at it, switch from GPLv2+/MIT to GPLv2+/BSD2c before adding more.
>
> Suggested-by: Rob Herring <robh@kernel.org>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  v2: New
>
>  arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts | 3 +--
>  arch/arm64/boot/dts/realtek/rtd1295.dtsi          | 3 +--
>  arch/arm64/boot/dts/realtek/rtd129x.dtsi          | 3 +--
>  3 files changed, 3 insertions(+), 6 deletions(-)

Acked-by: Rob Herring <robh@kernel.org>

It's really only schema files that I'm pushing towards BSD2C. Maybe in
hindsight we should have done MIT as that's more common in the dts
files.

Rob

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 1/8] dt-bindings: watchdog: realtek: Convert RTD119x to schema
  2019-10-20  4:08 ` [PATCH v2 1/8] dt-bindings: watchdog: realtek: Convert RTD119x to schema Andreas Färber
@ 2019-10-25 21:16   ` Rob Herring
  2019-10-25 21:24     ` Andreas Färber
  0 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2019-10-25 21:16 UTC (permalink / raw)
  To: Andreas Färber
  Cc: linux-realtek-soc, linux-arm-kernel, Wim Van Sebroeck,
	Guenter Roeck, Mark Rutland, linux-watchdog, devicetree,
	linux-kernel

On Sun, Oct 20, 2019 at 06:08:10AM +0200, Andreas Färber wrote:
> Convert the Realtek watchdog binding to a YAML schema.
> 
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  v2: New
>  
>  .../bindings/watchdog/realtek,rtd119x.txt          | 17 ----------
>  .../bindings/watchdog/realtek,rtd119x.yaml         | 38 ++++++++++++++++++++++
>  2 files changed, 38 insertions(+), 17 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt
>  create mode 100644 Documentation/devicetree/bindings/watchdog/realtek,rtd119x.yaml
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt b/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt
> deleted file mode 100644
> index 05653054bd5b..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -Realtek RTD1295 Watchdog
> -========================
> -
> -Required properties:
> -
> -- compatible :  Should be "realtek,rtd1295-watchdog"
> -- reg        :  Specifies the physical base address and size of registers
> -- clocks     :  Specifies one clock input
> -
> -
> -Example:
> -
> -	watchdog@98007680 {
> -		compatible = "realtek,rtd1295-watchdog";
> -		reg = <0x98007680 0x100>;
> -		clocks = <&osc27M>;
> -	};
> diff --git a/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.yaml b/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.yaml
> new file mode 100644
> index 000000000000..5d92cfdfd046
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.yaml
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/watchdog/realtek,rtd119x.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Realtek RTD1295 Watchdog
> +
> +maintainers:
> +  - Andreas Färber <afaerber@suse.de>
> +
> +allOf:
> +  - $ref: watchdog.yaml#
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: realtek,rtd1295-watchdog

You can drop the 'oneOf' here unless you're planning to add another 
entry with 2 compatible strings.

With that,

Reviewed-by: Rob Herring <robh@kernel.org>

> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +
> +examples:
> +  - |
> +	watchdog@98007680 {
> +		compatible = "realtek,rtd1295-watchdog";
> +		reg = <0x98007680 0x100>;
> +		clocks = <&osc27M>;
> +	};
> +...
> -- 
> 2.16.4
> 

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 2/8] dt-bindings: rtc: realtek: Convert RTD119x to schema
  2019-10-20  4:08 ` [PATCH v2 2/8] dt-bindings: rtc: " Andreas Färber
@ 2019-10-25 21:20   ` Rob Herring
  2019-10-28 10:46     ` Andreas Färber
  0 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2019-10-25 21:20 UTC (permalink / raw)
  To: Andreas Färber
  Cc: linux-realtek-soc, linux-arm-kernel, Alessandro Zummo,
	Alexandre Belloni, Mark Rutland, linux-rtc, devicetree,
	linux-kernel

On Sun, Oct 20, 2019 at 06:08:11AM +0200, Andreas Färber wrote:
> Convert the RTD119x binding to a YAML schema.
> 
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  v2: New
>  
>  .../devicetree/bindings/rtc/realtek,rtd119x.txt    | 16 ---------
>  .../devicetree/bindings/rtc/realtek,rtd119x.yaml   | 38 ++++++++++++++++++++++
>  2 files changed, 38 insertions(+), 16 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
>  create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml


> diff --git a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
> new file mode 100644
> index 000000000000..71b7396bd469
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause

Missing ()

Though I'm not sure it matters other than consistency.

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/realtek,rtd119x.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Realtek RTD129x Real-Time Clock
> +
> +allOf:
> +  - $ref: "rtc.yaml#"
> +
> +maintainers:
> +  - Andreas Färber <afaerber@suse.de>
> +
> +properties:
> +  compatible:
> +    const: realtek,rtd1295-rtc
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +    description: Specifies the clock gate
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +
> +examples:
> +  - |
> +	rtc@9801b600 {
> +		compatible = "realtek,rtd1295-clk";
> +		reg = <0x9801b600 0x100>;
> +		clocks = <&clkc RTD1295_CLK_EN_MISC_RTC>;

You need the include file here or the example won't build (run 'make 
dt_binding_check').

> +	};
> +...
> -- 
> 2.16.4
> 

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 3/8] dt-bindings: arm: realtek: Tidy up conversion to json-schema
  2019-10-20  4:08 ` [PATCH v2 3/8] dt-bindings: arm: realtek: Tidy up conversion to json-schema Andreas Färber
@ 2019-10-25 21:21   ` Rob Herring
  2019-10-26 13:57     ` Andreas Färber
  0 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2019-10-25 21:21 UTC (permalink / raw)
  To: Andreas Färber
  Cc: linux-realtek-soc, linux-arm-kernel, Andreas Färber,
	Mark Rutland, devicetree, linux-kernel

On Sun, 20 Oct 2019 06:08:12 +0200, =?UTF-8?q?Andreas=20F=C3=A4rber?= wrote:
> Restore the device names for compatible strings as comments.
> Prepare for adding more SoCs by inserting oneOf.
> 
> Fixes: 693af5f3eeaa ("dt-bindings: arm: Convert Realtek board/soc bindings to json-schema")
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  v2: New
>  
>  Documentation/devicetree/bindings/arm/realtek.yaml | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 1/8] dt-bindings: watchdog: realtek: Convert RTD119x to schema
  2019-10-25 21:16   ` Rob Herring
@ 2019-10-25 21:24     ` Andreas Färber
  2019-10-27  2:04       ` Andreas Färber
  0 siblings, 1 reply; 22+ messages in thread
From: Andreas Färber @ 2019-10-25 21:24 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-realtek-soc, linux-arm-kernel, Wim Van Sebroeck,
	Guenter Roeck, Mark Rutland, linux-watchdog, devicetree,
	linux-kernel

Am 25.10.19 um 23:16 schrieb Rob Herring:
> On Sun, Oct 20, 2019 at 06:08:10AM +0200, Andreas Färber wrote:
>> Convert the Realtek watchdog binding to a YAML schema.
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>>  v2: New
>>  
>>  .../bindings/watchdog/realtek,rtd119x.txt          | 17 ----------
>>  .../bindings/watchdog/realtek,rtd119x.yaml         | 38 ++++++++++++++++++++++
>>  2 files changed, 38 insertions(+), 17 deletions(-)
>>  delete mode 100644 Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt
>>  create mode 100644 Documentation/devicetree/bindings/watchdog/realtek,rtd119x.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt b/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt
>> deleted file mode 100644
>> index 05653054bd5b..000000000000
>> --- a/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt
>> +++ /dev/null
>> @@ -1,17 +0,0 @@
>> -Realtek RTD1295 Watchdog
>> -========================
>> -
>> -Required properties:
>> -
>> -- compatible :  Should be "realtek,rtd1295-watchdog"
>> -- reg        :  Specifies the physical base address and size of registers
>> -- clocks     :  Specifies one clock input
>> -
>> -
>> -Example:
>> -
>> -	watchdog@98007680 {
>> -		compatible = "realtek,rtd1295-watchdog";
>> -		reg = <0x98007680 0x100>;
>> -		clocks = <&osc27M>;
>> -	};
>> diff --git a/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.yaml b/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.yaml
>> new file mode 100644
>> index 000000000000..5d92cfdfd046
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/watchdog/realtek,rtd119x.yaml
>> @@ -0,0 +1,38 @@
>> +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: "http://devicetree.org/schemas/watchdog/realtek,rtd119x.yaml#"
>> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
>> +
>> +title: Realtek RTD1295 Watchdog
>> +
>> +maintainers:
>> +  - Andreas Färber <afaerber@suse.de>
>> +
>> +allOf:
>> +  - $ref: watchdog.yaml#
>> +
>> +properties:
>> +  compatible:
>> +    oneOf:
>> +      - const: realtek,rtd1295-watchdog
> 
> You can drop the 'oneOf' here unless you're planning to add another 
> entry with 2 compatible strings.

It's a preparation for adding rtd1195-watchdog when needed, to make
future diffs smaller. There's also RTD1395 and RTD1619 to be tested.

> 
> With that,
> 
> Reviewed-by: Rob Herring <robh@kernel.org>

Thanks,
Andreas

-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 3/8] dt-bindings: arm: realtek: Tidy up conversion to json-schema
  2019-10-25 21:21   ` Rob Herring
@ 2019-10-26 13:57     ` Andreas Färber
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Färber @ 2019-10-26 13:57 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-realtek-soc, linux-arm-kernel, Mark Rutland, devicetree,
	linux-kernel

Am 25.10.19 um 23:21 schrieb Rob Herring:
> On Sun, 20 Oct 2019 06:08:12 +0200, =?UTF-8?q?Andreas=20F=C3=A4rber?= wrote:
>> Restore the device names for compatible strings as comments.
>> Prepare for adding more SoCs by inserting oneOf.
>>
>> Fixes: 693af5f3eeaa ("dt-bindings: arm: Convert Realtek board/soc bindings to json-schema")
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>>  v2: New
>>  
>>  Documentation/devicetree/bindings/arm/realtek.yaml | 15 ++++++++-------
>>  1 file changed, 8 insertions(+), 7 deletions(-)
>>
> 
> Reviewed-by: Rob Herring <robh@kernel.org>

Thanks, applied to linux-realtek.git v5.5/dt64:

https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek.git/log/?h=v5.5/dt64

Regards,
Andreas

-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 1/8] dt-bindings: watchdog: realtek: Convert RTD119x to schema
  2019-10-25 21:24     ` Andreas Färber
@ 2019-10-27  2:04       ` Andreas Färber
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Färber @ 2019-10-27  2:04 UTC (permalink / raw)
  To: Rob Herring, Wim Van Sebroeck, Guenter Roeck
  Cc: Mark Rutland, devicetree, linux-watchdog, linux-realtek-soc,
	linux-kernel, linux-arm-kernel

Am 25.10.19 um 23:24 schrieb Andreas Färber:
> Am 25.10.19 um 23:16 schrieb Rob Herring:
>> On Sun, Oct 20, 2019 at 06:08:10AM +0200, Andreas Färber wrote:
>>> +properties:
>>> +  compatible:
>>> +    oneOf:
>>> +      - const: realtek,rtd1295-watchdog
>>
>> You can drop the 'oneOf' here unless you're planning to add another 
>> entry with 2 compatible strings.
> 
> It's a preparation for adding rtd1195-watchdog when needed, to make
> future diffs smaller. There's also RTD1395 and RTD1619 to be tested.
> 
>> With that,
>>
>> Reviewed-by: Rob Herring <robh@kernel.org>

Self-NAK.

The example doesn't pass dt_binding_check: It doesn't like the tabs
retained from the original binding. Replacing them with four spaces
makes it pass. Will post a v3.

As for the compatibles, currently in the rtd1195.dtsi patch I'm reusing
"realtek,rtd1295-watchdog", to avoid a dependency on the watchdog tree.

Long-term that's kind of ugly as it uses a later model number.
That leaves us with two alternatives:

a) "realtek,rtd1195-watchdog", "realtek,rtd1295-watchdog" - this
requires oneOf. Allows to distinguish between RTD1195 and RTD1295 while
remaining compatible with the current driver.

b) "realtek,rtd1195-watchdog" - requires the driver change now and
requires the binding to be merged before I can use it in the DT but
doesn't need oneOf here.

Guenter, any preference here?

Thanks,
Andreas

-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 2/8] dt-bindings: rtc: realtek: Convert RTD119x to schema
  2019-10-25 21:20   ` Rob Herring
@ 2019-10-28 10:46     ` Andreas Färber
  2019-10-28 11:29       ` Alexandre Belloni
  0 siblings, 1 reply; 22+ messages in thread
From: Andreas Färber @ 2019-10-28 10:46 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-realtek-soc, linux-arm-kernel, Alessandro Zummo,
	Alexandre Belloni, Mark Rutland, linux-rtc, devicetree,
	linux-kernel

Am 25.10.19 um 23:20 schrieb Rob Herring:
> On Sun, Oct 20, 2019 at 06:08:11AM +0200, Andreas Färber wrote:
>> Convert the RTD119x binding to a YAML schema.
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>>  v2: New
>>  
>>  .../devicetree/bindings/rtc/realtek,rtd119x.txt    | 16 ---------
>>  .../devicetree/bindings/rtc/realtek,rtd119x.yaml   | 38 ++++++++++++++++++++++
>>  2 files changed, 38 insertions(+), 16 deletions(-)
>>  delete mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
>>  create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
> 
> 
>> diff --git a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
>> new file mode 100644
>> index 000000000000..71b7396bd469
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml

While renaming the file to .yaml I would like to also rename it to 1195.
It would need to be 1x9x to cover RTD1195 and e.g. RTD1296, and looking
forward the wildcard may need to be 1xxx to cover also RTD1619, which
quickly becomes unrecognizable.

>> @@ -0,0 +1,38 @@
>> +# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
> 
> Missing ()

Fixed.

> 
> Though I'm not sure it matters other than consistency.
> 
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/rtc/realtek,rtd119x.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Realtek RTD129x Real-Time Clock
>> +
>> +allOf:
>> +  - $ref: "rtc.yaml#"
>> +
>> +maintainers:
>> +  - Andreas Färber <afaerber@suse.de>
>> +
>> +properties:
>> +  compatible:
>> +    const: realtek,rtd1295-rtc
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  clocks:
>> +    maxItems: 1
>> +    description: Specifies the clock gate
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - clocks
>> +
>> +examples:
>> +  - |
>> +	rtc@9801b600 {
>> +		compatible = "realtek,rtd1295-clk";

This reveals a bug in the original binding example. Fixed to -rtc.

>> +		reg = <0x9801b600 0x100>;
>> +		clocks = <&clkc RTD1295_CLK_EN_MISC_RTC>;
> 
> You need the include file here or the example won't build (run 'make 
> dt_binding_check').

We can't. You acked the clk binding but the driver never got any review,
so it didn't get merged and cannot be depended on here.

I've changed it to an artificial 42 so that dt_binding_check passes.
I've also needed to fix the indentation to 4 spaces.

Regards,
Andreas

> 
>> +	};
>> +...
>> -- 
>> 2.16.4
>>


-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 2/8] dt-bindings: rtc: realtek: Convert RTD119x to schema
  2019-10-28 10:46     ` Andreas Färber
@ 2019-10-28 11:29       ` Alexandre Belloni
  0 siblings, 0 replies; 22+ messages in thread
From: Alexandre Belloni @ 2019-10-28 11:29 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Rob Herring, linux-realtek-soc, linux-arm-kernel,
	Alessandro Zummo, Mark Rutland, linux-rtc, devicetree,
	linux-kernel

On 28/10/2019 11:46:48+0100, Andreas Färber wrote:
> Am 25.10.19 um 23:20 schrieb Rob Herring:
> > On Sun, Oct 20, 2019 at 06:08:11AM +0200, Andreas Färber wrote:
> >> Convert the RTD119x binding to a YAML schema.
> >>
> >> Signed-off-by: Andreas Färber <afaerber@suse.de>
> >> ---
> >>  v2: New
> >>  
> >>  .../devicetree/bindings/rtc/realtek,rtd119x.txt    | 16 ---------
> >>  .../devicetree/bindings/rtc/realtek,rtd119x.yaml   | 38 ++++++++++++++++++++++
> >>  2 files changed, 38 insertions(+), 16 deletions(-)
> >>  delete mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
> >>  create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
> > 
> > 
> >> diff --git a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
> >> new file mode 100644
> >> index 000000000000..71b7396bd469
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
> 
> While renaming the file to .yaml I would like to also rename it to 1195.
> It would need to be 1x9x to cover RTD1195 and e.g. RTD1296, and looking
> forward the wildcard may need to be 1xxx to cover also RTD1619, which
> quickly becomes unrecognizable.
> 

I'm fine with removing wildcards as much as possible.


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 4/8] dt-bindings: arm: realtek: Document RTD1293 and Synology DS418j
  2019-10-20  4:08 ` [PATCH v2 4/8] dt-bindings: arm: realtek: Document RTD1293 and Synology DS418j Andreas Färber
@ 2019-10-29  4:31   ` Andreas Färber
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Färber @ 2019-10-29  4:31 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: Mark Rutland, devicetree, linux-kernel, info, Rob Herring,
	linux-arm-kernel

Am 20.10.19 um 06:08 schrieb Andreas Färber:
> Define compatible strings for Realtek RTD1293 SoC and Synology
> DiskStation DS418j NAS.
> 
> Cc: info@synology.com
> Acked-by: Rob Herring <robh@kernel.org>
> [AF: Converted to json-schema]
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  v1 -> v2:
>  * Converted to YAML schema
>  
>  Documentation/devicetree/bindings/arm/realtek.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)

Applied to linux-realtek.git v5.5/dt64:

https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek.git/log/?h=v5.5/dt64

Regards,
Andreas

-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 5/8] arm64: dts: realtek: Change dual-license from MIT to BSD
  2019-10-25 20:52   ` Rob Herring
@ 2019-10-29  4:39     ` Andreas Färber
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Färber @ 2019-10-29  4:39 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, devicetree, linux-kernel, LAKML, linux-realtek-soc

Am 25.10.19 um 22:52 schrieb Rob Herring:
> On Sat, Oct 19, 2019 at 11:08 PM Andreas Färber <afaerber@suse.de> wrote:
>>
>> Move the SPDX-License-Identifier to the top line and update to SPDX 2.0.
>> While at it, switch from GPLv2+/MIT to GPLv2+/BSD2c before adding more.
>>
>> Suggested-by: Rob Herring <robh@kernel.org>
>> Cc: Rob Herring <robh@kernel.org>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>>  v2: New
>>
>>  arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts | 3 +--
>>  arch/arm64/boot/dts/realtek/rtd1295.dtsi          | 3 +--
>>  arch/arm64/boot/dts/realtek/rtd129x.dtsi          | 3 +--
>>  3 files changed, 3 insertions(+), 6 deletions(-)
> 
> Acked-by: Rob Herring <robh@kernel.org>
> 
> It's really only schema files that I'm pushing towards BSD2C. Maybe in
> hindsight we should have done MIT as that's more common in the dts
> files.

After discussion with Rob about whether to drop this change I dropped
the misunderstood Suggested-by and applied this to linux-realtek.git
v5.5/dt64 anyway:

https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek.git/log/?h=v5.5/dt64

I don't mind either license.

Thanks,
Andreas

-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 6/8] arm64: dts: realtek: Add RTD1293 and Synology DS418j
  2019-10-20  4:08 ` [PATCH v2 6/8] arm64: dts: realtek: Add RTD1293 and Synology DS418j Andreas Färber
@ 2019-10-29  4:40   ` Andreas Färber
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Färber @ 2019-10-29  4:40 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: Mark Rutland, devicetree, linux-kernel, info, Rob Herring,
	linux-arm-kernel

Am 20.10.19 um 06:08 schrieb Andreas Färber:
> Add Device Trees for RTD1293 SoC and Synology DiskStation DS418j NAS.
> 
> Cc: info@synology.com
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  v1 -> v2:
>  * Moved SPDX-License-Identifier to top
>  * Dropped "arm,armv8" (Rob)
>  * Changed from MIT to BSD-2-Clause (Rob)
>  * Dropped accidental enable-method and cpu-release-addr
>  
>  arch/arm64/boot/dts/realtek/Makefile           |  3 ++
>  arch/arm64/boot/dts/realtek/rtd1293-ds418j.dts | 30 +++++++++++++++
>  arch/arm64/boot/dts/realtek/rtd1293.dtsi       | 51 ++++++++++++++++++++++++++
>  3 files changed, 84 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/realtek/rtd1293-ds418j.dts
>  create mode 100644 arch/arm64/boot/dts/realtek/rtd1293.dtsi

Applied to linux-realtek.git v5.5/dt64:

https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek.git/log/?h=v5.5/dt64

Regards,
Andreas

-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 7/8] dt-bindings: arm: realtek: Document RTD1296 and Synology DS418
  2019-10-20  4:08 ` [PATCH v2 7/8] dt-bindings: arm: realtek: Document RTD1296 and Synology DS418 Andreas Färber
@ 2019-10-29  4:40   ` Andreas Färber
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Färber @ 2019-10-29  4:40 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: Mark Rutland, devicetree, linux-kernel, info, Rob Herring,
	linux-arm-kernel

Am 20.10.19 um 06:08 schrieb Andreas Färber:
> Define compatible strings for Realtek RTD1296 SoC and Synology
> DiskStation DS418 NAS.
> 
> Cc: info@synology.com
> Acked-by: Rob Herring <robh@kernel.org>
> [AF: Converted to json-schema]
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  v1 -> v2:
>  * Converted to YAML schema
>  
>  Documentation/devicetree/bindings/arm/realtek.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)

Applied to linux-realtek.git v5.5/dt64:

https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek.git/log/?h=v5.5/dt64

Regards,
Andreas

-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 8/8] arm64: dts: realtek: Add RTD1296 and Synology DS418
  2019-10-20  4:08 ` [PATCH v2 8/8] arm64: dts: realtek: Add " Andreas Färber
@ 2019-10-29  4:41   ` Andreas Färber
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Färber @ 2019-10-29  4:41 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: Mark Rutland, devicetree, linux-kernel, info, Rob Herring,
	linux-arm-kernel

Am 20.10.19 um 06:08 schrieb Andreas Färber:
> Add Device Trees for RTD1296 SoC and Synology DiskStation DS418.
> 
> Cc: info@synology.com
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  v1 -> v2:
>  * Moved SPDX-License-Identifier to top
>  * Dropped "arm,armv8" (Rob)
>  * Changed from MIT to BSD-2-Clause (Rob)
>  * Dropped accidental enable-method and cpu-release-addr
>  * Fixed DS418 to use rtd1296.dtsi
>  
>  arch/arm64/boot/dts/realtek/Makefile          |  2 +
>  arch/arm64/boot/dts/realtek/rtd1296-ds418.dts | 30 +++++++++++++
>  arch/arm64/boot/dts/realtek/rtd1296.dtsi      | 65 +++++++++++++++++++++++++++
>  3 files changed, 97 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/realtek/rtd1296-ds418.dts
>  create mode 100644 arch/arm64/boot/dts/realtek/rtd1296.dtsi

Applied to linux-realtek.git v5.5/dt64:

https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek.git/log/?h=v5.5/dt64

Regards,
Andreas

-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-10-29  4:41 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20191020040817.16882-1-afaerber@suse.de>
2019-10-20  4:08 ` [PATCH v2 1/8] dt-bindings: watchdog: realtek: Convert RTD119x to schema Andreas Färber
2019-10-25 21:16   ` Rob Herring
2019-10-25 21:24     ` Andreas Färber
2019-10-27  2:04       ` Andreas Färber
2019-10-20  4:08 ` [PATCH v2 2/8] dt-bindings: rtc: " Andreas Färber
2019-10-25 21:20   ` Rob Herring
2019-10-28 10:46     ` Andreas Färber
2019-10-28 11:29       ` Alexandre Belloni
2019-10-20  4:08 ` [PATCH v2 3/8] dt-bindings: arm: realtek: Tidy up conversion to json-schema Andreas Färber
2019-10-25 21:21   ` Rob Herring
2019-10-26 13:57     ` Andreas Färber
2019-10-20  4:08 ` [PATCH v2 4/8] dt-bindings: arm: realtek: Document RTD1293 and Synology DS418j Andreas Färber
2019-10-29  4:31   ` Andreas Färber
2019-10-20  4:08 ` [PATCH v2 5/8] arm64: dts: realtek: Change dual-license from MIT to BSD Andreas Färber
2019-10-25 20:52   ` Rob Herring
2019-10-29  4:39     ` Andreas Färber
2019-10-20  4:08 ` [PATCH v2 6/8] arm64: dts: realtek: Add RTD1293 and Synology DS418j Andreas Färber
2019-10-29  4:40   ` Andreas Färber
2019-10-20  4:08 ` [PATCH v2 7/8] dt-bindings: arm: realtek: Document RTD1296 and Synology DS418 Andreas Färber
2019-10-29  4:40   ` Andreas Färber
2019-10-20  4:08 ` [PATCH v2 8/8] arm64: dts: realtek: Add " Andreas Färber
2019-10-29  4:41   ` Andreas Färber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).