public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/2] riscv: dts: canaan: Unused devices cleanup
@ 2024-05-08 10:20 Geert Uytterhoeven
  2024-05-08 10:20 ` [PATCH 1/2] riscv: dts: canaan: Clean up serial aliases Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2024-05-08 10:20 UTC (permalink / raw)
  To: Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Damien Le Moal
  Cc: linux-riscv, Geert Uytterhoeven

	Hi all,

This patch series clean ups aliases and device enablement for unused
devices on Kendryte K210-based systems.

Thanks for your comments!

Geert Uytterhoeven (2):
  riscv: dts: canaan: Clean up serial aliases
  riscv: dts: canaan: Disable I/O devices unless used

 arch/riscv/boot/dts/canaan/canaan_kd233.dts   |  7 +++++-
 arch/riscv/boot/dts/canaan/k210.dtsi          | 23 +++++++++++++------
 arch/riscv/boot/dts/canaan/k210_generic.dts   |  5 +++-
 .../riscv/boot/dts/canaan/sipeed_maix_bit.dts |  9 +++++++-
 .../boot/dts/canaan/sipeed_maix_dock.dts      |  7 +++++-
 arch/riscv/boot/dts/canaan/sipeed_maix_go.dts |  9 +++++++-
 .../boot/dts/canaan/sipeed_maixduino.dts      | 10 ++++++--
 7 files changed, 56 insertions(+), 14 deletions(-)

-- 
2.34.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

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

* [PATCH 1/2] riscv: dts: canaan: Clean up serial aliases
  2024-05-08 10:20 [PATCH 0/2] riscv: dts: canaan: Unused devices cleanup Geert Uytterhoeven
@ 2024-05-08 10:20 ` Geert Uytterhoeven
  2024-05-09  6:56   ` Damien Le Moal
  2024-05-08 10:20 ` [PATCH 2/2] riscv: dts: canaan: Disable I/O devices unless used Geert Uytterhoeven
  2024-05-28 11:26 ` [PATCH 0/2] riscv: dts: canaan: Unused devices cleanup Conor Dooley
  2 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2024-05-08 10:20 UTC (permalink / raw)
  To: Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Damien Le Moal
  Cc: linux-riscv, Geert Uytterhoeven

The SoC-specific k210.dtsi declares aliases for all four serial ports.
However, none of the board-specific DTS files configure pin control for
any but the first serial port, so the last three ports are not usable.

Move the aliases node from the SoC-specific k210.dtsi to the
board-specific DTS files, as these are really board-specific, and retain
the sole port that is usable.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/riscv/boot/dts/canaan/canaan_kd233.dts     | 4 ++++
 arch/riscv/boot/dts/canaan/k210.dtsi            | 7 -------
 arch/riscv/boot/dts/canaan/k210_generic.dts     | 4 ++++
 arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts  | 4 ++++
 arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts | 4 ++++
 arch/riscv/boot/dts/canaan/sipeed_maix_go.dts   | 4 ++++
 arch/riscv/boot/dts/canaan/sipeed_maixduino.dts | 4 ++++
 7 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/arch/riscv/boot/dts/canaan/canaan_kd233.dts b/arch/riscv/boot/dts/canaan/canaan_kd233.dts
index 8df4cf3656f2c932..8cbef8daaec1097b 100644
--- a/arch/riscv/boot/dts/canaan/canaan_kd233.dts
+++ b/arch/riscv/boot/dts/canaan/canaan_kd233.dts
@@ -15,6 +15,10 @@ / {
 	model = "Kendryte KD233";
 	compatible = "canaan,kendryte-kd233", "canaan,kendryte-k210";
 
+	aliases {
+		serial0 = &uarths0;
+	};
+
 	chosen {
 		bootargs = "earlycon console=ttySIF0";
 		stdout-path = "serial0:115200n8";
diff --git a/arch/riscv/boot/dts/canaan/k210.dtsi b/arch/riscv/boot/dts/canaan/k210.dtsi
index f87c5164d9cf658d..febdff79c13cc5fc 100644
--- a/arch/riscv/boot/dts/canaan/k210.dtsi
+++ b/arch/riscv/boot/dts/canaan/k210.dtsi
@@ -16,13 +16,6 @@ / {
 	#size-cells = <1>;
 	compatible = "canaan,kendryte-k210";
 
-	aliases {
-		serial0 = &uarths0;
-		serial1 = &uart1;
-		serial2 = &uart2;
-		serial3 = &uart3;
-	};
-
 	/*
 	 * The K210 has an sv39 MMU following the privileged specification v1.9.
 	 * Since this is a non-ratified draft specification, the kernel does not
diff --git a/arch/riscv/boot/dts/canaan/k210_generic.dts b/arch/riscv/boot/dts/canaan/k210_generic.dts
index 396c8ca4d24db79a..36b4ba9cc556bc3f 100644
--- a/arch/riscv/boot/dts/canaan/k210_generic.dts
+++ b/arch/riscv/boot/dts/canaan/k210_generic.dts
@@ -15,6 +15,10 @@ / {
 	model = "Kendryte K210 generic";
 	compatible = "canaan,kendryte-k210";
 
+	aliases {
+		serial0 = &uarths0;
+	};
+
 	chosen {
 		bootargs = "earlycon console=ttySIF0";
 		stdout-path = "serial0:115200n8";
diff --git a/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts b/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts
index 6d25bf07481a6ed8..e5a77672fc65bc47 100644
--- a/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts
+++ b/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts
@@ -17,6 +17,10 @@ / {
 	compatible = "sipeed,maix-bit", "sipeed,maix-bitm",
 		     "canaan,kendryte-k210";
 
+	aliases {
+		serial0 = &uarths0;
+	};
+
 	chosen {
 		bootargs = "earlycon console=ttySIF0";
 		stdout-path = "serial0:115200n8";
diff --git a/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts b/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts
index f4f4d8d5e8b88cad..04c2bf227b1c69ad 100644
--- a/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts
+++ b/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts
@@ -17,6 +17,10 @@ / {
 	compatible = "sipeed,maix-dock-m1", "sipeed,maix-dock-m1w",
 		     "canaan,kendryte-k210";
 
+	aliases {
+		serial0 = &uarths0;
+	};
+
 	chosen {
 		bootargs = "earlycon console=ttySIF0";
 		stdout-path = "serial0:115200n8";
diff --git a/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts b/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts
index 0d86df47e1ed3987..f9f6cc136bc3d98a 100644
--- a/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts
+++ b/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts
@@ -16,6 +16,10 @@ / {
 	model = "SiPeed MAIX GO";
 	compatible = "sipeed,maix-go", "canaan,kendryte-k210";
 
+	aliases {
+		serial0 = &uarths0;
+	};
+
 	chosen {
 		bootargs = "earlycon console=ttySIF0";
 		stdout-path = "serial0:115200n8";
diff --git a/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts b/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts
index 5c05c498e2b88bf4..e90188bfb70bd8a4 100644
--- a/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts
+++ b/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts
@@ -15,6 +15,10 @@ / {
 	model = "SiPeed MAIXDUINO";
 	compatible = "sipeed,maixduino", "canaan,kendryte-k210";
 
+	aliases {
+		serial0 = &uarths0;
+	};
+
 	chosen {
 		bootargs = "earlycon console=ttySIF0";
 		stdout-path = "serial0:115200n8";
-- 
2.34.1


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

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

* [PATCH 2/2] riscv: dts: canaan: Disable I/O devices unless used
  2024-05-08 10:20 [PATCH 0/2] riscv: dts: canaan: Unused devices cleanup Geert Uytterhoeven
  2024-05-08 10:20 ` [PATCH 1/2] riscv: dts: canaan: Clean up serial aliases Geert Uytterhoeven
@ 2024-05-08 10:20 ` Geert Uytterhoeven
  2024-05-09  6:58   ` Damien Le Moal
  2024-05-28 11:26 ` [PATCH 0/2] riscv: dts: canaan: Unused devices cleanup Conor Dooley
  2 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2024-05-08 10:20 UTC (permalink / raw)
  To: Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Damien Le Moal
  Cc: linux-riscv, Geert Uytterhoeven

It is considered good practice to disable on-SoC devices providing
external I/O in the SoC-specific .dtsi, and enable them explicitly in
the board-specific DTS files when actually wired-up and used.

Hence:
  - Set the status of I/O devices in k210.dtsi to "disabled",
  - Override the status of used I/O devices in board-specific DTS files
    to "okay",
  - Drop unneeded status overrides in board DTS-specific files for the
    always-enabled pin controller.

On e.g. MAiXBiT, this gets rid of an error message when probing the
unused slave-only spi2 controller:

    dw_spi_mmio 50240000.spi: error -22: problem registering spi host
    dw_spi_mmio 50240000.spi: probe with driver dw_spi_mmio failed with error -22

which is seen since commit 98d75b9ef282f6b9 ("spi: dw: Drop default
number of CS setting").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Commit 98d75b9ef282f6b9 is in spi/for-next (next-20240508 and later).

See also "[PATCH] spi: dw: Bail out early on unsupported target mode"
https://lore.kernel.org/r/7ae28d83bff7351f34782658ae1bb69cc731693e.1715163113.git.geert+renesas@glider.be

 arch/riscv/boot/dts/canaan/canaan_kd233.dts     |  3 ++-
 arch/riscv/boot/dts/canaan/k210.dtsi            | 16 ++++++++++++++++
 arch/riscv/boot/dts/canaan/k210_generic.dts     |  1 -
 arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts  |  5 ++++-
 arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts |  3 ++-
 arch/riscv/boot/dts/canaan/sipeed_maix_go.dts   |  5 ++++-
 arch/riscv/boot/dts/canaan/sipeed_maixduino.dts |  6 ++++--
 7 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/arch/riscv/boot/dts/canaan/canaan_kd233.dts b/arch/riscv/boot/dts/canaan/canaan_kd233.dts
index 8cbef8daaec1097b..a7d753b6fdfd1366 100644
--- a/arch/riscv/boot/dts/canaan/canaan_kd233.dts
+++ b/arch/riscv/boot/dts/canaan/canaan_kd233.dts
@@ -50,7 +50,6 @@ key {
 &fpioa {
 	pinctrl-0 = <&jtag_pinctrl>;
 	pinctrl-names = "default";
-	status = "okay";
 
 	jtag_pinctrl: jtag-pinmux {
 		pinmux = <K210_FPIOA(0, K210_PCF_JTAG_TCLK)>,
@@ -122,6 +121,7 @@ &i2s0 {
 	#sound-dai-cells = <1>;
 	pinctrl-0 = <&i2s0_pinctrl>;
 	pinctrl-names = "default";
+	status = "okay";
 };
 
 &spi0 {
@@ -129,6 +129,7 @@ &spi0 {
 	pinctrl-names = "default";
 	num-cs = <1>;
 	cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
+	status = "okay";
 
 	panel@0 {
 		compatible = "canaan,kd233-tft", "ilitek,ili9341";
diff --git a/arch/riscv/boot/dts/canaan/k210.dtsi b/arch/riscv/boot/dts/canaan/k210.dtsi
index febdff79c13cc5fc..4f5d40fa1e77c624 100644
--- a/arch/riscv/boot/dts/canaan/k210.dtsi
+++ b/arch/riscv/boot/dts/canaan/k210.dtsi
@@ -130,6 +130,7 @@ uarths0: serial@38000000 {
 			reg = <0x38000000 0x1000>;
 			interrupts = <33>;
 			clocks = <&sysclk K210_CLK_CPU>;
+			status = "disabled";
 		};
 
 		gpio0: gpio-controller@38001000 {
@@ -145,6 +146,7 @@ gpio0: gpio-controller@38001000 {
 				     <62>, <63>, <64>, <65>;
 			gpio-controller;
 			ngpios = <32>;
+			status = "disabled";
 		};
 
 		dmac0: dma-controller@50000000 {
@@ -180,6 +182,7 @@ gpio1: gpio@50200000 {
 					 <&sysclk K210_CLK_GPIO>;
 				clock-names = "bus", "db";
 				resets = <&sysrst K210_RST_GPIO>;
+				status = "disabled";
 
 				gpio1_0: gpio-port@0 {
 					#gpio-cells = <2>;
@@ -207,6 +210,7 @@ uart1: serial@50210000 {
 				dsr-override;
 				cts-override;
 				ri-override;
+				status = "disabled";
 			};
 
 			uart2: serial@50220000 {
@@ -223,6 +227,7 @@ uart2: serial@50220000 {
 				dsr-override;
 				cts-override;
 				ri-override;
+				status = "disabled";
 			};
 
 			uart3: serial@50230000 {
@@ -239,6 +244,7 @@ uart3: serial@50230000 {
 				dsr-override;
 				cts-override;
 				ri-override;
+				status = "disabled";
 			};
 
 			spi2: spi@50240000 {
@@ -252,6 +258,7 @@ spi2: spi@50240000 {
 					 <&sysclk K210_CLK_APB0>;
 				clock-names = "ssi_clk", "pclk";
 				resets = <&sysrst K210_RST_SPI2>;
+				status = "disabled";
 			};
 
 			i2s0: i2s@50250000 {
@@ -261,6 +268,7 @@ i2s0: i2s@50250000 {
 				clocks = <&sysclk K210_CLK_I2S0>;
 				clock-names = "i2sclk";
 				resets = <&sysrst K210_RST_I2S0>;
+				status = "disabled";
 			};
 
 			i2s1: i2s@50260000 {
@@ -270,6 +278,7 @@ i2s1: i2s@50260000 {
 				clocks = <&sysclk K210_CLK_I2S1>;
 				clock-names = "i2sclk";
 				resets = <&sysrst K210_RST_I2S1>;
+				status = "disabled";
 			};
 
 			i2s2: i2s@50270000 {
@@ -279,6 +288,7 @@ i2s2: i2s@50270000 {
 				clocks = <&sysclk K210_CLK_I2S2>;
 				clock-names = "i2sclk";
 				resets = <&sysrst K210_RST_I2S2>;
+				status = "disabled";
 			};
 
 			i2c0: i2c@50280000 {
@@ -289,6 +299,7 @@ i2c0: i2c@50280000 {
 					 <&sysclk K210_CLK_APB0>;
 				clock-names = "ref", "pclk";
 				resets = <&sysrst K210_RST_I2C0>;
+				status = "disabled";
 			};
 
 			i2c1: i2c@50290000 {
@@ -299,6 +310,7 @@ i2c1: i2c@50290000 {
 					 <&sysclk K210_CLK_APB0>;
 				clock-names = "ref", "pclk";
 				resets = <&sysrst K210_RST_I2C1>;
+				status = "disabled";
 			};
 
 			i2c2: i2c@502a0000 {
@@ -309,6 +321,7 @@ i2c2: i2c@502a0000 {
 					 <&sysclk K210_CLK_APB0>;
 				clock-names = "ref", "pclk";
 				resets = <&sysrst K210_RST_I2C2>;
+				status = "disabled";
 			};
 
 			fpioa: pinmux@502b0000 {
@@ -457,6 +470,7 @@ spi0: spi@52000000 {
 				reset-names = "spi";
 				num-cs = <4>;
 				reg-io-width = <4>;
+				status = "disabled";
 			};
 
 			spi1: spi@53000000 {
@@ -472,6 +486,7 @@ spi1: spi@53000000 {
 				reset-names = "spi";
 				num-cs = <4>;
 				reg-io-width = <4>;
+				status = "disabled";
 			};
 
 			spi3: spi@54000000 {
@@ -488,6 +503,7 @@ spi3: spi@54000000 {
 
 				num-cs = <4>;
 				reg-io-width = <4>;
+				status = "disabled";
 			};
 		};
 	};
diff --git a/arch/riscv/boot/dts/canaan/k210_generic.dts b/arch/riscv/boot/dts/canaan/k210_generic.dts
index 36b4ba9cc556bc3f..5734cc03753b1a06 100644
--- a/arch/riscv/boot/dts/canaan/k210_generic.dts
+++ b/arch/riscv/boot/dts/canaan/k210_generic.dts
@@ -28,7 +28,6 @@ chosen {
 &fpioa {
 	pinctrl-0 = <&jtag_pins>;
 	pinctrl-names = "default";
-	status = "okay";
 
 	jtag_pins: jtag-pinmux {
 		pinmux = <K210_FPIOA(0, K210_PCF_JTAG_TCLK)>,
diff --git a/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts b/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts
index e5a77672fc65bc47..2ab376d609d2592d 100644
--- a/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts
+++ b/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts
@@ -62,7 +62,6 @@ key-boot {
 &fpioa {
 	pinctrl-names = "default";
 	pinctrl-0 = <&jtag_pinctrl>;
-	status = "okay";
 
 	jtag_pinctrl: jtag-pinmux {
 		pinmux = <K210_FPIOA(0, K210_PCF_JTAG_TCLK)>,
@@ -160,6 +159,7 @@ &i2s0 {
 	#sound-dai-cells = <1>;
 	pinctrl-0 = <&i2s0_pinctrl>;
 	pinctrl-names = "default";
+	status = "okay";
 };
 
 &i2c1 {
@@ -174,6 +174,7 @@ &spi0 {
 	pinctrl-names = "default";
 	num-cs = <1>;
 	cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
+	status = "okay";
 
 	panel@0 {
 		compatible = "sitronix,st7789v";
@@ -203,6 +204,8 @@ mmc@0 {
 };
 
 &spi3 {
+	status = "okay";
+
 	flash@0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
diff --git a/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts b/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts
index 04c2bf227b1c69ad..d98e20775c073639 100644
--- a/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts
+++ b/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts
@@ -67,7 +67,6 @@ key-boot {
 &fpioa {
 	pinctrl-0 = <&jtag_pinctrl>;
 	pinctrl-names = "default";
-	status = "okay";
 
 	jtag_pinctrl: jtag-pinmux {
 		pinmux = <K210_FPIOA(0, K210_PCF_JTAG_TCLK)>,
@@ -163,6 +162,7 @@ &i2s0 {
 	#sound-dai-cells = <1>;
 	pinctrl-0 = <&i2s0_pinctrl>;
 	pinctrl-names = "default";
+	status = "okay";
 };
 
 &i2c1 {
@@ -177,6 +177,7 @@ &spi0 {
 	pinctrl-names = "default";
 	num-cs = <1>;
 	cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
+	status = "okay";
 
 	panel@0 {
 		compatible = "sitronix,st7789v";
diff --git a/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts b/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts
index f9f6cc136bc3d98a..79ecd549700a006e 100644
--- a/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts
+++ b/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts
@@ -73,7 +73,6 @@ key-down {
 &fpioa {
 	pinctrl-0 = <&jtag_pinctrl>;
 	pinctrl-names = "default";
-	status = "okay";
 
 	jtag_pinctrl: jtag-pinmux {
 		pinmux = <K210_FPIOA(0, K210_PCF_JTAG_TCLK)>,
@@ -171,6 +170,7 @@ &i2s0 {
 	#sound-dai-cells = <1>;
 	pinctrl-0 = <&i2s0_pinctrl>;
 	pinctrl-names = "default";
+	status = "okay";
 };
 
 &i2c1 {
@@ -185,6 +185,7 @@ &spi0 {
 	pinctrl-names = "default";
 	num-cs = <1>;
 	cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
+	status = "okay";
 
 	panel@0 {
 		compatible = "sitronix,st7789v";
@@ -213,6 +214,8 @@ mmc@0 {
 };
 
 &spi3 {
+	status = "okay";
+
 	flash@0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
diff --git a/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts b/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts
index e90188bfb70bd8a4..019c03ae51f6c485 100644
--- a/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts
+++ b/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts
@@ -43,8 +43,6 @@ vcc_3v3: regulator-3v3 {
 };
 
 &fpioa {
-	status = "okay";
-
 	uarths_pinctrl: uarths-pinmux {
 		pinmux = <K210_FPIOA(4, K210_PCF_UARTHS_RX)>, /* Header "0" */
 			 <K210_FPIOA(5, K210_PCF_UARTHS_TX)>; /* Header "1" */
@@ -136,6 +134,7 @@ &i2s0 {
 	#sound-dai-cells = <1>;
 	pinctrl-0 = <&i2s0_pinctrl>;
 	pinctrl-names = "default";
+	status = "okay";
 };
 
 &i2c1 {
@@ -150,6 +149,7 @@ &spi0 {
 	pinctrl-names = "default";
 	num-cs = <1>;
 	cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
+	status = "okay";
 
 	panel@0 {
 		compatible = "sitronix,st7789v";
@@ -178,6 +178,8 @@ mmc@0 {
 };
 
 &spi3 {
+	status = "okay";
+
 	flash@0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-- 
2.34.1


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

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

* Re: [PATCH 1/2] riscv: dts: canaan: Clean up serial aliases
  2024-05-08 10:20 ` [PATCH 1/2] riscv: dts: canaan: Clean up serial aliases Geert Uytterhoeven
@ 2024-05-09  6:56   ` Damien Le Moal
  0 siblings, 0 replies; 6+ messages in thread
From: Damien Le Moal @ 2024-05-09  6:56 UTC (permalink / raw)
  To: Geert Uytterhoeven, Conor Dooley, Paul Walmsley, Palmer Dabbelt,
	Albert Ou
  Cc: linux-riscv

On 5/8/24 7:20 PM, Geert Uytterhoeven wrote:
> The SoC-specific k210.dtsi declares aliases for all four serial ports.
> However, none of the board-specific DTS files configure pin control for
> any but the first serial port, so the last three ports are not usable.
> 
> Move the aliases node from the SoC-specific k210.dtsi to the
> board-specific DTS files, as these are really board-specific, and retain
> the sole port that is usable.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Looks good to me.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

-- 
Damien Le Moal
Western Digital Research


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

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

* Re: [PATCH 2/2] riscv: dts: canaan: Disable I/O devices unless used
  2024-05-08 10:20 ` [PATCH 2/2] riscv: dts: canaan: Disable I/O devices unless used Geert Uytterhoeven
@ 2024-05-09  6:58   ` Damien Le Moal
  0 siblings, 0 replies; 6+ messages in thread
From: Damien Le Moal @ 2024-05-09  6:58 UTC (permalink / raw)
  To: Geert Uytterhoeven, Conor Dooley, Paul Walmsley, Palmer Dabbelt,
	Albert Ou
  Cc: linux-riscv

On 5/8/24 7:20 PM, Geert Uytterhoeven wrote:
> It is considered good practice to disable on-SoC devices providing
> external I/O in the SoC-specific .dtsi, and enable them explicitly in
> the board-specific DTS files when actually wired-up and used.
> 
> Hence:
>   - Set the status of I/O devices in k210.dtsi to "disabled",
>   - Override the status of used I/O devices in board-specific DTS files
>     to "okay",
>   - Drop unneeded status overrides in board DTS-specific files for the
>     always-enabled pin controller.
> 
> On e.g. MAiXBiT, this gets rid of an error message when probing the
> unused slave-only spi2 controller:
> 
>     dw_spi_mmio 50240000.spi: error -22: problem registering spi host
>     dw_spi_mmio 50240000.spi: probe with driver dw_spi_mmio failed with error -22
> 
> which is seen since commit 98d75b9ef282f6b9 ("spi: dw: Drop default
> number of CS setting").
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Looks good to me.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

-- 
Damien Le Moal
Western Digital Research


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

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

* Re: [PATCH 0/2] riscv: dts: canaan: Unused devices cleanup
  2024-05-08 10:20 [PATCH 0/2] riscv: dts: canaan: Unused devices cleanup Geert Uytterhoeven
  2024-05-08 10:20 ` [PATCH 1/2] riscv: dts: canaan: Clean up serial aliases Geert Uytterhoeven
  2024-05-08 10:20 ` [PATCH 2/2] riscv: dts: canaan: Disable I/O devices unless used Geert Uytterhoeven
@ 2024-05-28 11:26 ` Conor Dooley
  2 siblings, 0 replies; 6+ messages in thread
From: Conor Dooley @ 2024-05-28 11:26 UTC (permalink / raw)
  To: Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Damien Le Moal, Geert Uytterhoeven
  Cc: Conor Dooley, linux-riscv

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

On Wed, 08 May 2024 12:20:56 +0200, Geert Uytterhoeven wrote:
> 	Hi all,
> 
> This patch series clean ups aliases and device enablement for unused
> devices on Kendryte K210-based systems.
> 
> Thanks for your comments!
> 
> [...]

I've put these on fixes. I think #1 is maybe stretching the definition
of a fix, but #2's fair game since it avoids runtime warnings. Thanks
for the patches.

[1/2] riscv: dts: canaan: Clean up serial aliases
      https://git.kernel.org/conor/c/9235784cb63f
[2/2] riscv: dts: canaan: Disable I/O devices unless used
      https://git.kernel.org/conor/c/2c917b55d665

Thanks,
Conor.

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

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

end of thread, other threads:[~2024-05-28 11:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-08 10:20 [PATCH 0/2] riscv: dts: canaan: Unused devices cleanup Geert Uytterhoeven
2024-05-08 10:20 ` [PATCH 1/2] riscv: dts: canaan: Clean up serial aliases Geert Uytterhoeven
2024-05-09  6:56   ` Damien Le Moal
2024-05-08 10:20 ` [PATCH 2/2] riscv: dts: canaan: Disable I/O devices unless used Geert Uytterhoeven
2024-05-09  6:58   ` Damien Le Moal
2024-05-28 11:26 ` [PATCH 0/2] riscv: dts: canaan: Unused devices cleanup Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox