linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/4] Add Caninos Loucos Labrador CoM and Base Board Device Tree
@ 2020-09-22  2:42 Matheus Castello
  2020-09-22  2:42 ` [PATCH v7 1/4] dt-bindings: Add vendor prefix for Caninos Loucos Matheus Castello
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Matheus Castello @ 2020-09-22  2:42 UTC (permalink / raw)
  To: manivannan.sadhasivam, afaerber, mark.rutland, robh+dt
  Cc: edgar.righi, igor.lima, helen.koike, linux-arm-kernel,
	devicetree, linux-kernel, linux-actions, Matheus Castello

I'm adding to the series the new Labrador v3, since it uses the same vendor
prefix. Thanks Andreas, Mani and Rob for your time reviewing it.

Changes since v6:
- Add new caninos,labrador-v3 CoM and caninos,labrador-base-m2 base board
- Improve Model description

Changes since v5:
(Suggested by Andreas Färber)
- Put caninos,labrador-v2 as const one level down

Matheus Castello (4):
  dt-bindings: Add vendor prefix for Caninos Loucos
  dt-bindings: arm: actions: Document Caninos Loucos Labrador
  ARM: dts: Add Caninos Loucos Labrador v2
  arm64: dts: Add Caninos Loucos Labrador v3

 .../devicetree/bindings/arm/actions.yaml      |  10 ++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 arch/arm/boot/dts/Makefile                    |   1 +
 .../arm/boot/dts/owl-s500-labrador-base-m.dts |  35 +++++
 arch/arm/boot/dts/owl-s500-labrador-v2.dtsi   |  22 ++++
 arch/arm64/boot/dts/actions/Makefile          |   2 +
 .../dts/actions/s700-labrador-base-m2.dts     |  34 +++++
 .../boot/dts/actions/s700-labrador-v3.dtsi    | 122 ++++++++++++++++++
 8 files changed, 228 insertions(+)
 create mode 100644 arch/arm/boot/dts/owl-s500-labrador-base-m.dts
 create mode 100644 arch/arm/boot/dts/owl-s500-labrador-v2.dtsi
 create mode 100644 arch/arm64/boot/dts/actions/s700-labrador-base-m2.dts
 create mode 100644 arch/arm64/boot/dts/actions/s700-labrador-v3.dtsi

--
2.28.0


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

* [PATCH v7 1/4] dt-bindings: Add vendor prefix for Caninos Loucos
  2020-09-22  2:42 [PATCH v7 0/4] Add Caninos Loucos Labrador CoM and Base Board Device Tree Matheus Castello
@ 2020-09-22  2:42 ` Matheus Castello
  2020-09-22  6:25   ` Manivannan Sadhasivam
  2020-09-22  8:14   ` Manivannan Sadhasivam
  2020-09-22  2:43 ` [PATCH v7 2/4] dt-bindings: arm: actions: Document Caninos Loucos Labrador Matheus Castello
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 13+ messages in thread
From: Matheus Castello @ 2020-09-22  2:42 UTC (permalink / raw)
  To: manivannan.sadhasivam, afaerber, mark.rutland, robh+dt
  Cc: edgar.righi, igor.lima, helen.koike, linux-arm-kernel,
	devicetree, linux-kernel, linux-actions, Matheus Castello,
	Rob Herring

The Caninos Loucos Program develops Single Board Computers with an open
structure. The Program wants to form a community of developers to use
IoT technologies and disseminate the learning of embedded systems in
Brazil.

It is an initiative of the Technological Integrated Systems Laboratory
(LSI-TEC) with the support of Polytechnic School of the University of
São Paulo (Poli-USP) and Jon "Maddog" Hall.

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 63996ab03521..aac0dc3caf3b 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -179,6 +179,8 @@ patternProperties:
     description: CALAO Systems SAS
   "^calxeda,.*":
     description: Calxeda
+  "^caninos,.*":
+    description: Caninos Loucos Program
   "^capella,.*":
     description: Capella Microsystems, Inc
   "^cascoda,.*":
--
2.28.0


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

* [PATCH v7 2/4] dt-bindings: arm: actions: Document Caninos Loucos Labrador
  2020-09-22  2:42 [PATCH v7 0/4] Add Caninos Loucos Labrador CoM and Base Board Device Tree Matheus Castello
  2020-09-22  2:42 ` [PATCH v7 1/4] dt-bindings: Add vendor prefix for Caninos Loucos Matheus Castello
@ 2020-09-22  2:43 ` Matheus Castello
  2020-09-22  6:27   ` Manivannan Sadhasivam
  2020-09-22  2:43 ` [PATCH v7 3/4] ARM: dts: Add Caninos Loucos Labrador v2 Matheus Castello
  2020-09-22  2:43 ` [PATCH v7 4/4] arm64: dts: Add Caninos Loucos Labrador v3 Matheus Castello
  3 siblings, 1 reply; 13+ messages in thread
From: Matheus Castello @ 2020-09-22  2:43 UTC (permalink / raw)
  To: manivannan.sadhasivam, afaerber, mark.rutland, robh+dt
  Cc: edgar.righi, igor.lima, helen.koike, linux-arm-kernel,
	devicetree, linux-kernel, linux-actions, Matheus Castello,
	Rob Herring

Update the documentation to add the Caninos Loucos Labrador. Labrador
project consists of the computer on module Core v2 based on the Actions
Semi S500, computer on module Core v3 based on the Actions Semi S700
and the Labrador base boards.

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/arm/actions.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/actions.yaml b/Documentation/devicetree/bindings/arm/actions.yaml
index ace3fdaa8396..1cc66803ce2a 100644
--- a/Documentation/devicetree/bindings/arm/actions.yaml
+++ b/Documentation/devicetree/bindings/arm/actions.yaml
@@ -19,6 +19,11 @@ properties:
               - allo,sparky # Allo.com Sparky
               - cubietech,cubieboard6 # Cubietech CubieBoard6
           - const: actions,s500
+      - items:
+          - enum:
+              - caninos,labrador-base-m # Labrador Base Board M v1
+          - const: caninos,labrador-v2  # Labrador Core v2
+          - const: actions,s500
       - items:
           - enum:
               - lemaker,guitar-bb-rev-b # LeMaker Guitar Base Board rev. B
@@ -26,6 +31,11 @@ properties:
           - const: actions,s500

       # The Actions Semi S700 is a quad-core ARM Cortex-A53 SoC.
+      - items:
+          - enum:
+              - caninos,labrador-base-m2 # Labrador Base Board M v2
+          - const: caninos,labrador-v3   # Labrador Core v3
+          - const: actions,s700
       - items:
           - enum:
               - cubietech,cubieboard7 # Cubietech CubieBoard7
--
2.28.0


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

* [PATCH v7 3/4] ARM: dts: Add Caninos Loucos Labrador v2
  2020-09-22  2:42 [PATCH v7 0/4] Add Caninos Loucos Labrador CoM and Base Board Device Tree Matheus Castello
  2020-09-22  2:42 ` [PATCH v7 1/4] dt-bindings: Add vendor prefix for Caninos Loucos Matheus Castello
  2020-09-22  2:43 ` [PATCH v7 2/4] dt-bindings: arm: actions: Document Caninos Loucos Labrador Matheus Castello
@ 2020-09-22  2:43 ` Matheus Castello
  2020-09-22  6:27   ` Manivannan Sadhasivam
  2020-09-22  2:43 ` [PATCH v7 4/4] arm64: dts: Add Caninos Loucos Labrador v3 Matheus Castello
  3 siblings, 1 reply; 13+ messages in thread
From: Matheus Castello @ 2020-09-22  2:43 UTC (permalink / raw)
  To: manivannan.sadhasivam, afaerber, mark.rutland, robh+dt
  Cc: edgar.righi, igor.lima, helen.koike, linux-arm-kernel,
	devicetree, linux-kernel, linux-actions, Matheus Castello

Add Device Trees for Caninos Loucos Labrador CoM Core v2 and base board
M v1. Based on the work of Andreas Färber on Lemaker Guitar device tree.

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
---
 arch/arm/boot/dts/Makefile                    |  1 +
 .../arm/boot/dts/owl-s500-labrador-base-m.dts | 35 +++++++++++++++++++
 arch/arm/boot/dts/owl-s500-labrador-v2.dtsi   | 22 ++++++++++++
 3 files changed, 58 insertions(+)
 create mode 100644 arch/arm/boot/dts/owl-s500-labrador-base-m.dts
 create mode 100644 arch/arm/boot/dts/owl-s500-labrador-v2.dtsi

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 4572db3fa5ae..5d5e370af290 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -868,6 +868,7 @@ dtb-$(CONFIG_ARCH_ORION5X) += \
 dtb-$(CONFIG_ARCH_ACTIONS) += \
 	owl-s500-cubieboard6.dtb \
 	owl-s500-guitar-bb-rev-b.dtb \
+	owl-s500-labrador-base-m.dtb \
 	owl-s500-sparky.dtb
 dtb-$(CONFIG_ARCH_PRIMA2) += \
 	prima2-evb.dtb
diff --git a/arch/arm/boot/dts/owl-s500-labrador-base-m.dts b/arch/arm/boot/dts/owl-s500-labrador-base-m.dts
new file mode 100644
index 000000000000..c92f8bdcb331
--- /dev/null
+++ b/arch/arm/boot/dts/owl-s500-labrador-base-m.dts
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Caninos Labrador Base Board
+ *
+ * Copyright (c) 2019-2020 Matheus Castello
+ */
+
+/dts-v1/;
+
+#include "owl-s500-labrador-v2.dtsi"
+
+/ {
+	model = "Caninos Labrador Core v2 on Labrador Base-M v1";
+	compatible = "caninos,labrador-base-m",
+		     "caninos,labrador-v2", "actions,s500";
+
+	aliases {
+		serial3 = &uart3;
+	};
+
+	chosen {
+		stdout-path = "serial3:115200n8";
+	};
+
+	uart3_clk: uart3-clk {
+		compatible = "fixed-clock";
+		clock-frequency = <921600>;
+		#clock-cells = <0>;
+	};
+};
+
+&uart3 {
+	status = "okay";
+	clocks = <&uart3_clk>;
+};
diff --git a/arch/arm/boot/dts/owl-s500-labrador-v2.dtsi b/arch/arm/boot/dts/owl-s500-labrador-v2.dtsi
new file mode 100644
index 000000000000..883ff2f9886d
--- /dev/null
+++ b/arch/arm/boot/dts/owl-s500-labrador-v2.dtsi
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Caninos Labrador SoM V2
+ *
+ * Copyright (c) 2019-2020 Matheus Castello
+ */
+
+#include "owl-s500.dtsi"
+
+/ {
+	model = "Caninos Labrador Core V2.1";
+	compatible = "caninos,labrador-v2", "actions,s500";
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0x0 0x80000000>;
+	};
+};
+
+&timer {
+	clocks = <&hosc>;
+};
--
2.28.0


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

* [PATCH v7 4/4] arm64: dts: Add Caninos Loucos Labrador v3
  2020-09-22  2:42 [PATCH v7 0/4] Add Caninos Loucos Labrador CoM and Base Board Device Tree Matheus Castello
                   ` (2 preceding siblings ...)
  2020-09-22  2:43 ` [PATCH v7 3/4] ARM: dts: Add Caninos Loucos Labrador v2 Matheus Castello
@ 2020-09-22  2:43 ` Matheus Castello
  2020-09-22  6:14   ` Manivannan Sadhasivam
  3 siblings, 1 reply; 13+ messages in thread
From: Matheus Castello @ 2020-09-22  2:43 UTC (permalink / raw)
  To: manivannan.sadhasivam, afaerber, mark.rutland, robh+dt
  Cc: edgar.righi, igor.lima, helen.koike, linux-arm-kernel,
	devicetree, linux-kernel, linux-actions, Matheus Castello

Add Device Trees for Caninos Loucos Labrador CoM Core v3 and base board
M v2. Based on the work of Andreas Färber on Cubieboard 7 device tree.

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
---
 arch/arm64/boot/dts/actions/Makefile          |   2 +
 .../dts/actions/s700-labrador-base-m2.dts     |  34 +++++
 .../boot/dts/actions/s700-labrador-v3.dtsi    | 122 ++++++++++++++++++
 3 files changed, 158 insertions(+)
 create mode 100644 arch/arm64/boot/dts/actions/s700-labrador-base-m2.dts
 create mode 100644 arch/arm64/boot/dts/actions/s700-labrador-v3.dtsi

diff --git a/arch/arm64/boot/dts/actions/Makefile b/arch/arm64/boot/dts/actions/Makefile
index b57fd2372ecd..3765697fa91e 100644
--- a/arch/arm64/boot/dts/actions/Makefile
+++ b/arch/arm64/boot/dts/actions/Makefile
@@ -2,4 +2,6 @@

 dtb-$(CONFIG_ARCH_ACTIONS) += s700-cubieboard7.dtb

+dtb-$(CONFIG_ARCH_ACTIONS) += s700-labrador-base-m2.dtb
+
 dtb-$(CONFIG_ARCH_ACTIONS) += s900-bubblegum-96.dtb
diff --git a/arch/arm64/boot/dts/actions/s700-labrador-base-m2.dts b/arch/arm64/boot/dts/actions/s700-labrador-base-m2.dts
new file mode 100644
index 000000000000..63bbca46475b
--- /dev/null
+++ b/arch/arm64/boot/dts/actions/s700-labrador-base-m2.dts
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2020 Matheus Castello
+ */
+
+/dts-v1/;
+
+#include "s700-labrador-v3.dtsi"
+
+/ {
+	compatible = "caninos,labrador-base-m2",
+		     "caninos,labrador-v3", "actions,s700";
+	model = "Caninos Labrador Core v3 on Labrador Base-M v2";
+
+	aliases {
+		serial3 = &uart3;
+	};
+
+	chosen {
+		stdout-path = "serial3:115200n8";
+	};
+};
+
+&uart3 {
+	status = "okay";
+};
+
+&i2c0 {
+	status = "okay";
+};
+
+&i2c1 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/actions/s700-labrador-v3.dtsi b/arch/arm64/boot/dts/actions/s700-labrador-v3.dtsi
new file mode 100644
index 000000000000..91addba6382b
--- /dev/null
+++ b/arch/arm64/boot/dts/actions/s700-labrador-v3.dtsi
@@ -0,0 +1,122 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2020 Matheus Castello
+ */
+
+#include "s700.dtsi"
+
+/ {
+	compatible = "caninos,labrador-v3", "actions,s700";
+	model = "Caninos Labrador Core v3.1";
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0x0 0x0 0x0 0x80000000>;
+	};
+
+	memory@1,e0000000 {
+		device_type = "memory";
+		reg = <0x1 0xe0000000 0x0 0x0>;
+	};
+
+	/* Labrador v3 firmware does not support PSCI */
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0 0x1f000020>;
+			next-level-cache = <&L2>;
+		};
+
+		cpu1: cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x1>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0 0x1f000020>;
+			next-level-cache = <&L2>;
+		};
+
+		cpu2: cpu@2 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x2>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0 0x1f000020>;
+			next-level-cache = <&L2>;
+		};
+
+		cpu3: cpu@3 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x3>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0 0x1f000020>;
+			next-level-cache = <&L2>;
+		};
+	};
+
+	L2: l2-cache {
+		compatible = "cache";
+		cache-level = <2>;
+	};
+};
+
+&timer {
+	clocks = <&hosc>;
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_default>;
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_default>;
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_default>;
+};
+
+&pinctrl {
+	i2c0_default: i2c0_default {
+		pinmux {
+			groups = "i2c0_mfp";
+			function = "i2c0";
+		};
+		pinconf {
+			pins = "i2c0_sclk", "i2c0_sdata";
+			bias-pull-up;
+		};
+	};
+
+	i2c1_default: i2c1_default {
+		pinmux {
+			groups = "i2c1_dummy";
+			function = "i2c1";
+		};
+		pinconf {
+			pins = "i2c1_sclk", "i2c1_sdata";
+			bias-pull-up;
+		};
+	};
+
+	i2c2_default: i2c2_default {
+		pinmux {
+			groups = "i2c2_dummy";
+			function = "i2c2";
+		};
+		pinconf {
+			pins = "i2c2_sclk", "i2c2_sdata";
+			bias-pull-up;
+		};
+	};
+};
--
2.28.0


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

* Re: [PATCH v7 4/4] arm64: dts: Add Caninos Loucos Labrador v3
  2020-09-22  2:43 ` [PATCH v7 4/4] arm64: dts: Add Caninos Loucos Labrador v3 Matheus Castello
@ 2020-09-22  6:14   ` Manivannan Sadhasivam
  2020-09-22  8:32     ` Arnd Bergmann
  0 siblings, 1 reply; 13+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-22  6:14 UTC (permalink / raw)
  To: Matheus Castello, arnd, olof
  Cc: afaerber, mark.rutland, robh+dt, edgar.righi, igor.lima,
	helen.koike, linux-arm-kernel, devicetree, linux-kernel,
	linux-actions

Hi,

On Mon, Sep 21, 2020 at 11:43:02PM -0300, Matheus Castello wrote:
> Add Device Trees for Caninos Loucos Labrador CoM Core v3 and base board
> M v2. Based on the work of Andreas Färber on Cubieboard 7 device tree.
> 
> Signed-off-by: Matheus Castello <matheus@castello.eng.br>
> ---
>  arch/arm64/boot/dts/actions/Makefile          |   2 +
>  .../dts/actions/s700-labrador-base-m2.dts     |  34 +++++
>  .../boot/dts/actions/s700-labrador-v3.dtsi    | 122 ++++++++++++++++++
>  3 files changed, 158 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/actions/s700-labrador-base-m2.dts
>  create mode 100644 arch/arm64/boot/dts/actions/s700-labrador-v3.dtsi
> 
> diff --git a/arch/arm64/boot/dts/actions/Makefile b/arch/arm64/boot/dts/actions/Makefile
> index b57fd2372ecd..3765697fa91e 100644
> --- a/arch/arm64/boot/dts/actions/Makefile
> +++ b/arch/arm64/boot/dts/actions/Makefile
> @@ -2,4 +2,6 @@
> 
>  dtb-$(CONFIG_ARCH_ACTIONS) += s700-cubieboard7.dtb
> 
> +dtb-$(CONFIG_ARCH_ACTIONS) += s700-labrador-base-m2.dtb
> +
>  dtb-$(CONFIG_ARCH_ACTIONS) += s900-bubblegum-96.dtb
> diff --git a/arch/arm64/boot/dts/actions/s700-labrador-base-m2.dts b/arch/arm64/boot/dts/actions/s700-labrador-base-m2.dts
> new file mode 100644
> index 000000000000..63bbca46475b
> --- /dev/null
> +++ b/arch/arm64/boot/dts/actions/s700-labrador-base-m2.dts
> @@ -0,0 +1,34 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2020 Matheus Castello
> + */
> +
> +/dts-v1/;
> +
> +#include "s700-labrador-v3.dtsi"
> +
> +/ {
> +	compatible = "caninos,labrador-base-m2",
> +		     "caninos,labrador-v3", "actions,s700";
> +	model = "Caninos Labrador Core v3 on Labrador Base-M v2";
> +
> +	aliases {
> +		serial3 = &uart3;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial3:115200n8";
> +	};
> +};
> +
> +&uart3 {
> +	status = "okay";

No fixed clock?

> +};
> +
> +&i2c0 {
> +	status = "okay";
> +};
> +
> +&i2c1 {
> +	status = "okay";
> +};
> diff --git a/arch/arm64/boot/dts/actions/s700-labrador-v3.dtsi b/arch/arm64/boot/dts/actions/s700-labrador-v3.dtsi
> new file mode 100644
> index 000000000000..91addba6382b
> --- /dev/null
> +++ b/arch/arm64/boot/dts/actions/s700-labrador-v3.dtsi
> @@ -0,0 +1,122 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2020 Matheus Castello
> + */
> +
> +#include "s700.dtsi"
> +
> +/ {
> +	compatible = "caninos,labrador-v3", "actions,s700";
> +	model = "Caninos Labrador Core v3.1";
> +
> +	memory@0 {
> +		device_type = "memory";
> +		reg = <0x0 0x0 0x0 0x80000000>;
> +	};
> +
> +	memory@1,e0000000 {
> +		device_type = "memory";
> +		reg = <0x1 0xe0000000 0x0 0x0>;
> +	};
> +

What is the size of this memory? The datasheet says only 512MB Max.

> +	/* Labrador v3 firmware does not support PSCI */

Oops. This is unfortunate... I'm not sure if this is even acceptable for
ARM64 machines.

Let me add Olof and Arnd...

Thanks,
Mani

> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu0: cpu@0 {
> +			device_type = "cpu";
> +			compatible = "arm,cortex-a53";
> +			reg = <0x0>;
> +			enable-method = "spin-table";
> +			cpu-release-addr = <0 0x1f000020>;
> +			next-level-cache = <&L2>;
> +		};
> +
> +		cpu1: cpu@1 {
> +			device_type = "cpu";
> +			compatible = "arm,cortex-a53";
> +			reg = <0x1>;
> +			enable-method = "spin-table";
> +			cpu-release-addr = <0 0x1f000020>;
> +			next-level-cache = <&L2>;
> +		};
> +
> +		cpu2: cpu@2 {
> +			device_type = "cpu";
> +			compatible = "arm,cortex-a53";
> +			reg = <0x2>;
> +			enable-method = "spin-table";
> +			cpu-release-addr = <0 0x1f000020>;
> +			next-level-cache = <&L2>;
> +		};
> +
> +		cpu3: cpu@3 {
> +			device_type = "cpu";
> +			compatible = "arm,cortex-a53";
> +			reg = <0x3>;
> +			enable-method = "spin-table";
> +			cpu-release-addr = <0 0x1f000020>;
> +			next-level-cache = <&L2>;
> +		};
> +	};
> +
> +	L2: l2-cache {
> +		compatible = "cache";
> +		cache-level = <2>;
> +	};
> +};
> +
> +&timer {
> +	clocks = <&hosc>;
> +};
> +
> +&i2c0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c0_default>;
> +};
> +
> +&i2c1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_default>;
> +};
> +
> +&i2c2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c2_default>;
> +};
> +
> +&pinctrl {
> +	i2c0_default: i2c0_default {
> +		pinmux {
> +			groups = "i2c0_mfp";
> +			function = "i2c0";
> +		};
> +		pinconf {
> +			pins = "i2c0_sclk", "i2c0_sdata";
> +			bias-pull-up;
> +		};
> +	};
> +
> +	i2c1_default: i2c1_default {
> +		pinmux {
> +			groups = "i2c1_dummy";
> +			function = "i2c1";
> +		};
> +		pinconf {
> +			pins = "i2c1_sclk", "i2c1_sdata";
> +			bias-pull-up;
> +		};
> +	};
> +
> +	i2c2_default: i2c2_default {
> +		pinmux {
> +			groups = "i2c2_dummy";
> +			function = "i2c2";
> +		};
> +		pinconf {
> +			pins = "i2c2_sclk", "i2c2_sdata";
> +			bias-pull-up;
> +		};
> +	};
> +};
> --
> 2.28.0
> 

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

* Re: [PATCH v7 1/4] dt-bindings: Add vendor prefix for Caninos Loucos
  2020-09-22  2:42 ` [PATCH v7 1/4] dt-bindings: Add vendor prefix for Caninos Loucos Matheus Castello
@ 2020-09-22  6:25   ` Manivannan Sadhasivam
  2020-09-22  8:14   ` Manivannan Sadhasivam
  1 sibling, 0 replies; 13+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-22  6:25 UTC (permalink / raw)
  To: Matheus Castello, Rob Herring
  Cc: afaerber, mark.rutland, robh+dt, edgar.righi, igor.lima,
	helen.koike, linux-arm-kernel, devicetree, linux-kernel,
	linux-actions, Rob Herring

On Mon, Sep 21, 2020 at 11:42:59PM -0300, Matheus Castello wrote:
> The Caninos Loucos Program develops Single Board Computers with an open
> structure. The Program wants to form a community of developers to use
> IoT technologies and disseminate the learning of embedded systems in
> Brazil.
> 
> It is an initiative of the Technological Integrated Systems Laboratory
> (LSI-TEC) with the support of Polytechnic School of the University of
> São Paulo (Poli-USP) and Jon "Maddog" Hall.
> 
> Signed-off-by: Matheus Castello <matheus@castello.eng.br>
> Acked-by: Rob Herring <robh@kernel.org>
> Reviewed-by: Andreas Färber <afaerber@suse.de>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Rob, are you going to take this patch?

Thanks,
Mani

> ---
>  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index 63996ab03521..aac0dc3caf3b 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -179,6 +179,8 @@ patternProperties:
>      description: CALAO Systems SAS
>    "^calxeda,.*":
>      description: Calxeda
> +  "^caninos,.*":
> +    description: Caninos Loucos Program
>    "^capella,.*":
>      description: Capella Microsystems, Inc
>    "^cascoda,.*":
> --
> 2.28.0
> 

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

* Re: [PATCH v7 2/4] dt-bindings: arm: actions: Document Caninos Loucos Labrador
  2020-09-22  2:43 ` [PATCH v7 2/4] dt-bindings: arm: actions: Document Caninos Loucos Labrador Matheus Castello
@ 2020-09-22  6:27   ` Manivannan Sadhasivam
  0 siblings, 0 replies; 13+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-22  6:27 UTC (permalink / raw)
  To: Matheus Castello
  Cc: afaerber, mark.rutland, robh+dt, edgar.righi, igor.lima,
	helen.koike, linux-arm-kernel, devicetree, linux-kernel,
	linux-actions, Rob Herring

On Mon, Sep 21, 2020 at 11:43:00PM -0300, Matheus Castello wrote:
> Update the documentation to add the Caninos Loucos Labrador. Labrador
> project consists of the computer on module Core v2 based on the Actions
> Semi S500, computer on module Core v3 based on the Actions Semi S700
> and the Labrador base boards.
> 
> Signed-off-by: Matheus Castello <matheus@castello.eng.br>
> Acked-by: Rob Herring <robh@kernel.org>

Applied for v5.10!

Thanks,
Mani

> ---
>  Documentation/devicetree/bindings/arm/actions.yaml | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/actions.yaml b/Documentation/devicetree/bindings/arm/actions.yaml
> index ace3fdaa8396..1cc66803ce2a 100644
> --- a/Documentation/devicetree/bindings/arm/actions.yaml
> +++ b/Documentation/devicetree/bindings/arm/actions.yaml
> @@ -19,6 +19,11 @@ properties:
>                - allo,sparky # Allo.com Sparky
>                - cubietech,cubieboard6 # Cubietech CubieBoard6
>            - const: actions,s500
> +      - items:
> +          - enum:
> +              - caninos,labrador-base-m # Labrador Base Board M v1
> +          - const: caninos,labrador-v2  # Labrador Core v2
> +          - const: actions,s500
>        - items:
>            - enum:
>                - lemaker,guitar-bb-rev-b # LeMaker Guitar Base Board rev. B
> @@ -26,6 +31,11 @@ properties:
>            - const: actions,s500
> 
>        # The Actions Semi S700 is a quad-core ARM Cortex-A53 SoC.
> +      - items:
> +          - enum:
> +              - caninos,labrador-base-m2 # Labrador Base Board M v2
> +          - const: caninos,labrador-v3   # Labrador Core v3
> +          - const: actions,s700
>        - items:
>            - enum:
>                - cubietech,cubieboard7 # Cubietech CubieBoard7
> --
> 2.28.0
> 

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

* Re: [PATCH v7 3/4] ARM: dts: Add Caninos Loucos Labrador v2
  2020-09-22  2:43 ` [PATCH v7 3/4] ARM: dts: Add Caninos Loucos Labrador v2 Matheus Castello
@ 2020-09-22  6:27   ` Manivannan Sadhasivam
  0 siblings, 0 replies; 13+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-22  6:27 UTC (permalink / raw)
  To: Matheus Castello
  Cc: afaerber, mark.rutland, robh+dt, edgar.righi, igor.lima,
	helen.koike, linux-arm-kernel, devicetree, linux-kernel,
	linux-actions

On Mon, Sep 21, 2020 at 11:43:01PM -0300, Matheus Castello wrote:
> Add Device Trees for Caninos Loucos Labrador CoM Core v2 and base board
> M v1. Based on the work of Andreas Färber on Lemaker Guitar device tree.
> 
> Signed-off-by: Matheus Castello <matheus@castello.eng.br>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Reviewed-by: Andreas Färber <afaerber@suse.de>

Applied for v5.10!

Thanks,
Mani

> ---
>  arch/arm/boot/dts/Makefile                    |  1 +
>  .../arm/boot/dts/owl-s500-labrador-base-m.dts | 35 +++++++++++++++++++
>  arch/arm/boot/dts/owl-s500-labrador-v2.dtsi   | 22 ++++++++++++
>  3 files changed, 58 insertions(+)
>  create mode 100644 arch/arm/boot/dts/owl-s500-labrador-base-m.dts
>  create mode 100644 arch/arm/boot/dts/owl-s500-labrador-v2.dtsi
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 4572db3fa5ae..5d5e370af290 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -868,6 +868,7 @@ dtb-$(CONFIG_ARCH_ORION5X) += \
>  dtb-$(CONFIG_ARCH_ACTIONS) += \
>  	owl-s500-cubieboard6.dtb \
>  	owl-s500-guitar-bb-rev-b.dtb \
> +	owl-s500-labrador-base-m.dtb \
>  	owl-s500-sparky.dtb
>  dtb-$(CONFIG_ARCH_PRIMA2) += \
>  	prima2-evb.dtb
> diff --git a/arch/arm/boot/dts/owl-s500-labrador-base-m.dts b/arch/arm/boot/dts/owl-s500-labrador-base-m.dts
> new file mode 100644
> index 000000000000..c92f8bdcb331
> --- /dev/null
> +++ b/arch/arm/boot/dts/owl-s500-labrador-base-m.dts
> @@ -0,0 +1,35 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Caninos Labrador Base Board
> + *
> + * Copyright (c) 2019-2020 Matheus Castello
> + */
> +
> +/dts-v1/;
> +
> +#include "owl-s500-labrador-v2.dtsi"
> +
> +/ {
> +	model = "Caninos Labrador Core v2 on Labrador Base-M v1";
> +	compatible = "caninos,labrador-base-m",
> +		     "caninos,labrador-v2", "actions,s500";
> +
> +	aliases {
> +		serial3 = &uart3;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial3:115200n8";
> +	};
> +
> +	uart3_clk: uart3-clk {
> +		compatible = "fixed-clock";
> +		clock-frequency = <921600>;
> +		#clock-cells = <0>;
> +	};
> +};
> +
> +&uart3 {
> +	status = "okay";
> +	clocks = <&uart3_clk>;
> +};
> diff --git a/arch/arm/boot/dts/owl-s500-labrador-v2.dtsi b/arch/arm/boot/dts/owl-s500-labrador-v2.dtsi
> new file mode 100644
> index 000000000000..883ff2f9886d
> --- /dev/null
> +++ b/arch/arm/boot/dts/owl-s500-labrador-v2.dtsi
> @@ -0,0 +1,22 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Caninos Labrador SoM V2
> + *
> + * Copyright (c) 2019-2020 Matheus Castello
> + */
> +
> +#include "owl-s500.dtsi"
> +
> +/ {
> +	model = "Caninos Labrador Core V2.1";
> +	compatible = "caninos,labrador-v2", "actions,s500";
> +
> +	memory@0 {
> +		device_type = "memory";
> +		reg = <0x0 0x80000000>;
> +	};
> +};
> +
> +&timer {
> +	clocks = <&hosc>;
> +};
> --
> 2.28.0
> 

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

* Re: [PATCH v7 1/4] dt-bindings: Add vendor prefix for Caninos Loucos
  2020-09-22  2:42 ` [PATCH v7 1/4] dt-bindings: Add vendor prefix for Caninos Loucos Matheus Castello
  2020-09-22  6:25   ` Manivannan Sadhasivam
@ 2020-09-22  8:14   ` Manivannan Sadhasivam
  1 sibling, 0 replies; 13+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-22  8:14 UTC (permalink / raw)
  To: Matheus Castello
  Cc: afaerber, mark.rutland, robh+dt, edgar.righi, igor.lima,
	helen.koike, linux-arm-kernel, devicetree, linux-kernel,
	linux-actions, Rob Herring

On Mon, Sep 21, 2020 at 11:42:59PM -0300, Matheus Castello wrote:
> The Caninos Loucos Program develops Single Board Computers with an open
> structure. The Program wants to form a community of developers to use
> IoT technologies and disseminate the learning of embedded systems in
> Brazil.
> 
> It is an initiative of the Technological Integrated Systems Laboratory
> (LSI-TEC) with the support of Polytechnic School of the University of
> São Paulo (Poli-USP) and Jon "Maddog" Hall.
> 
> Signed-off-by: Matheus Castello <matheus@castello.eng.br>
> Acked-by: Rob Herring <robh@kernel.org>
> Reviewed-by: Andreas Färber <afaerber@suse.de>

Applied for v5.10!

Thanks,
Mani

> ---
>  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index 63996ab03521..aac0dc3caf3b 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -179,6 +179,8 @@ patternProperties:
>      description: CALAO Systems SAS
>    "^calxeda,.*":
>      description: Calxeda
> +  "^caninos,.*":
> +    description: Caninos Loucos Program
>    "^capella,.*":
>      description: Capella Microsystems, Inc
>    "^cascoda,.*":
> --
> 2.28.0
> 

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

* Re: [PATCH v7 4/4] arm64: dts: Add Caninos Loucos Labrador v3
  2020-09-22  6:14   ` Manivannan Sadhasivam
@ 2020-09-22  8:32     ` Arnd Bergmann
  2020-09-22 10:26       ` Catalin Marinas
  0 siblings, 1 reply; 13+ messages in thread
From: Arnd Bergmann @ 2020-09-22  8:32 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Matheus Castello, Olof Johansson, Andreas Färber,
	Mark Rutland, Rob Herring, edgar.righi, igor.lima, Helen Koike,
	Linux ARM, DTML, linux-kernel, linux-actions, Catalin Marinas,
	Will Deacon

On Tue, Sep 22, 2020 at 8:15 AM Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> wrote:
> On Mon, Sep 21, 2020 at 11:43:02PM -0300, Matheus Castello wrote:
> > +     /* Labrador v3 firmware does not support PSCI */
>
> Oops. This is unfortunate... I'm not sure if this is even acceptable for
> ARM64 machines.
>
> Let me add Olof and Arnd...

Adding Catalin and Will for additional input as well, this is more their
area than ours.

I don't think we have formalized this as a policy, but we clearly don't
want new boards to use the spin table hack. As there are other
boards using psci on the same chip, I don't think this is a
hardware bug.

Matheus: can you explain what keeps you from fixing the
bootloader instead?

      Arnd

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

* Re: [PATCH v7 4/4] arm64: dts: Add Caninos Loucos Labrador v3
  2020-09-22  8:32     ` Arnd Bergmann
@ 2020-09-22 10:26       ` Catalin Marinas
  2020-10-15 23:57         ` Matheus Castello
  0 siblings, 1 reply; 13+ messages in thread
From: Catalin Marinas @ 2020-09-22 10:26 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Manivannan Sadhasivam, Matheus Castello, Olof Johansson,
	Andreas Färber, Mark Rutland, Rob Herring, edgar.righi,
	igor.lima, Helen Koike, Linux ARM, DTML, linux-kernel,
	linux-actions, Will Deacon

On Tue, Sep 22, 2020 at 10:32:06AM +0200, Arnd Bergmann wrote:
> On Tue, Sep 22, 2020 at 8:15 AM Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> wrote:
> > On Mon, Sep 21, 2020 at 11:43:02PM -0300, Matheus Castello wrote:
> > > +     /* Labrador v3 firmware does not support PSCI */
> >
> > Oops. This is unfortunate... I'm not sure if this is even acceptable for
> > ARM64 machines.
> >
> > Let me add Olof and Arnd...
> 
> Adding Catalin and Will for additional input as well, this is more their
> area than ours.
> 
> I don't think we have formalized this as a policy, but we clearly don't
> want new boards to use the spin table hack. As there are other
> boards using psci on the same chip, I don't think this is a
> hardware bug.

I fully agree, we shouldn't allow new boards to use the spin-table
method unless EL3 is missing on the CPU implementation (not the case
here; only the APM hardware has this issue). Unfortunately we missed
another platform with A53, see commit bc66392d8258 ("arm64: dts: fsl:
Add device tree for S32V234-EVB").

The kernel relies on firmware for other things (power management, errata
workarounds), so an SMC calling convention compliant firmware is highly
recommended. I also don't see why it would be that hard to add PSCI.
Even if you don't port something like Trusted Firmware, U-Boot has basic
support for PSCI.

So from my perspective, NAK on this patch.

I'm tempted to also modify smp_spin_table_cpu_init() to print a big
warning and return an error if this is attempted on new platforms. IOW,
we make it a policy from now on.

-- 
Catalin

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

* Re: [PATCH v7 4/4] arm64: dts: Add Caninos Loucos Labrador v3
  2020-09-22 10:26       ` Catalin Marinas
@ 2020-10-15 23:57         ` Matheus Castello
  0 siblings, 0 replies; 13+ messages in thread
From: Matheus Castello @ 2020-10-15 23:57 UTC (permalink / raw)
  To: Catalin Marinas, Arnd Bergmann
  Cc: Manivannan Sadhasivam, Olof Johansson, Andreas Färber,
	Mark Rutland, Rob Herring, edgar.righi, igor.lima, Helen Koike,
	Linux ARM, DTML, linux-kernel, linux-actions, Will Deacon


Em 9/22/20 7:26 AM, Catalin Marinas escreveu:
> On Tue, Sep 22, 2020 at 10:32:06AM +0200, Arnd Bergmann wrote:
>> On Tue, Sep 22, 2020 at 8:15 AM Manivannan Sadhasivam
>> <manivannan.sadhasivam@linaro.org> wrote:
>>> On Mon, Sep 21, 2020 at 11:43:02PM -0300, Matheus Castello wrote:
>>>> +     /* Labrador v3 firmware does not support PSCI */
>>>
>>> Oops. This is unfortunate... I'm not sure if this is even acceptable for
>>> ARM64 machines.
>>>
>>> Let me add Olof and Arnd...
>>
>> Adding Catalin and Will for additional input as well, this is more their
>> area than ours.
>>
>> I don't think we have formalized this as a policy, but we clearly don't
>> want new boards to use the spin table hack. As there are other
>> boards using psci on the same chip, I don't think this is a
>> hardware bug.
> 
> I fully agree, we shouldn't allow new boards to use the spin-table
> method unless EL3 is missing on the CPU implementation (not the case
> here; only the APM hardware has this issue). Unfortunately we missed
> another platform with A53, see commit bc66392d8258 ("arm64: dts: fsl:
> Add device tree for S32V234-EVB").
> 
> The kernel relies on firmware for other things (power management, errata
> workarounds), so an SMC calling convention compliant firmware is highly
> recommended. I also don't see why it would be that hard to add PSCI.
> Even if you don't port something like Trusted Firmware, U-Boot has basic
> support for PSCI.
> 
> So from my perspective, NAK on this patch.
>

Thanks Arnd and Catalin, this is really just a limitation of the 
bootloader developed by manufactures that comes embedded in the board. I 
will drop this in the next version.

> I'm tempted to also modify smp_spin_table_cpu_init() to print a big
> warning and return an error if this is attempted on new platforms. IOW,
> we make it a policy from now on.
> 

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

end of thread, other threads:[~2020-10-15 23:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22  2:42 [PATCH v7 0/4] Add Caninos Loucos Labrador CoM and Base Board Device Tree Matheus Castello
2020-09-22  2:42 ` [PATCH v7 1/4] dt-bindings: Add vendor prefix for Caninos Loucos Matheus Castello
2020-09-22  6:25   ` Manivannan Sadhasivam
2020-09-22  8:14   ` Manivannan Sadhasivam
2020-09-22  2:43 ` [PATCH v7 2/4] dt-bindings: arm: actions: Document Caninos Loucos Labrador Matheus Castello
2020-09-22  6:27   ` Manivannan Sadhasivam
2020-09-22  2:43 ` [PATCH v7 3/4] ARM: dts: Add Caninos Loucos Labrador v2 Matheus Castello
2020-09-22  6:27   ` Manivannan Sadhasivam
2020-09-22  2:43 ` [PATCH v7 4/4] arm64: dts: Add Caninos Loucos Labrador v3 Matheus Castello
2020-09-22  6:14   ` Manivannan Sadhasivam
2020-09-22  8:32     ` Arnd Bergmann
2020-09-22 10:26       ` Catalin Marinas
2020-10-15 23:57         ` Matheus Castello

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).