Skip to contentSkip to conversation

Add SPI display support for UNIHIKER M10 V1.2

PATCH Superseded Miotsuki Mizuno 4 participants 6 messages Oct 10 – Oct 12

Subsystems (6)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add SPI display support for UNIHIKER M10 V1.2

Describe the onboard 240x320 RGB565 display with panel-mipi-dbi. The series adds the panel compatible and enables SPI2, GPIO reset/D-C and the PWM1 backlight. It uses the existing DRM and SPI drivers.

This series is based on the separate board I2C2 preparation commit. The prerequisite board patch was submitted separately:
https://lore.kernel.org/r/[email protected]
It does not depend on the pending NS2009 driver or binding.

The 132-byte initialization firmware is available from:
https://github.com/mio-tsuki/panel-mipi-dbi-firmware/releases/tag/v1.0.0
Required filename: dfrobot,unihiker-m10-display.bin
SHA256: 50412ae6d29c5bbfb7fac585528a761fb249d7944011a1b19c5e0f80a0418e5f The test kernel embeds it with CONFIG_EXTRA_FIRMWARE. Public release does not imply linux-firmware acceptance.

The nominal active area is 43.2 x 57.6 mm, represented as 43 x 58 mm. The published V1.3 schematic is not used as evidence for V1.2 supply connections; optional power/io supply properties are omitted.

SPI2 input is assigned 100 MHz. Active transfer register readback showed BAUDR=2, corresponding to 50 MHz. No oscilloscope measurement is claimed. GPIO_ACTIVE_HIGH reset matches the existing DRM helper and leaves the physical reset pin HIGH after initialization.

Built against Rockchip v7.4-armsoc/dts64, commit ae965b9856f033145e292b0c29082a26bcc45efd. Target DTS/schema, binding examples and strict checkpatch checks passed.
The exact display DTS booted through normal U-Boot three times in this retest with the original test kernel, without pstore instrumentation, clk_ignore_unused or regulator_ignore_unused. Physical corner patterns were confirmed; full and partial updates and five DRM disable/enable cycles completed. The exact display/touch combination also booted and its physical output was confirmed.

Earlier boots reset during early userspace; one partial USB log recorded an instruction abort. This was not reproduced in the latest retest. The resets may have resulted from accidental contact with a loose jumper wire during reboot. The cause has not been established, and no software fix is claimed.
Exact-DTS cold boot and deep suspend/resume have not been tested.

Mizuno Miotsuki (2):
dt-bindings: display: panel-mipi-dbi-spi: Add UNIHIKER M10 display
arm64: dts: rockchip: Enable display on UNIHIKER M10 V1.2

 .../display/panel/panel-mipi-dbi-spi.yaml     |  1 +
 .../dts/rockchip/rk3308-unihiker-m10-v1.2.dts | 53 +++++++++++++++++++
 2 files changed, 54 insertions(+)

base-commit: f4f7ecd2e0e8debcbab4789717cc79d570d665e3

Signature · 1 line
2.56.0
#1 lore raw

PATCH 1/2 dt-bindings: display: panel-mipi-dbi-spi: Add UNIHIKER M10 display

The DFRobot UNIHIKER M10 V1.2 has a 240x320 SPI display with an ILI9341-compatible command interface. Its initialization sequence can be supplied to the existing panel-mipi-dbi driver as firmware.

Add dfrobot,unihiker-m10-display as the panel-specific compatible, with panel-mipi-dbi-spi as the fallback.

---
 .../devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml    | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml +1 -0
index 6f0290c4e291..adef35f91670 100644
@@ -72,6 +72,7 @@ properties:
   compatible:
     items:
       - enum:
+          - dfrobot,unihiker-m10-display
           - saef,sftc154b
           - sainsmart18
           - shineworld,lh133k

base-commit: f4f7ecd2e0e8debcbab4789717cc79d570d665e3

Signature · 1 line
2.56.0
#2 lore raw

Re: [PATCH 1/2] dt-bindings: display: panel-mipi-dbi-spi: Add UNIHIKER M10 display

Quoted 8 lines · Miotsuki Mizuno

The DFRobot UNIHIKER M10 V1.2 has a 240x320 SPI display with an ILI9341-compatible command interface. Its initialization sequence can be supplied to the existing panel-mipi-dbi driver as firmware.

Add dfrobot,unihiker-m10-display as the panel-specific compatible, with panel-mipi-dbi-spi as the fallback.

Same issues as with all your patches.

Best regards,
Krzysztof

#3 lore raw

PATCH 2/2 arm64: dts: rockchip: Enable display on UNIHIKER M10 V1.2

In reply to Miotsuki Mizuno

Enable the onboard 240x320 SPI display using panel-mipi-dbi. Add its D/C and reset GPIOs, display timing, and PWM1 backlight, and enable SPI2 with a maximum transfer frequency of 50 MHz.

Assign SPI2 a 100 MHz input clock from DPLL so that the controller's even baud-rate divider can provide 50 MHz for pixel transfers.

Describe the 43.2 x 57.6 mm active area as 43 x 58 mm in the integer millimetre properties. The panel uses RGB565 pixel data and requires the external
initialization file dfrobot,unihiker-m10-display.bin. No DRM or SPI controller driver changes are needed.

---
 .../dts/rockchip/rk3308-unihiker-m10-v1.2.dts | 53 +++++++++++++++++++
 1 file changed, 53 insertions(+)
arch/arm64/boot/dts/rockchip/rk3308-unihiker-m10-v1.2.dts +53 -0
index 0c03f118378a..4dc01ea73e44 100644
@@ -22,6 +22,14 @@ chosen {
 		stdout-path = "serial0:1500000n8";
 	};
 
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pwm1 0 10000 0>;
+		brightness-levels = <0 16 32 48 64 80 96 112 128
+				     144 160 176 192 208 224 240 255>;
+		default-brightness-level = <12>;
+	};
+
 	keys {
 		compatible = "gpio-keys";
 
@@ -154,6 +162,13 @@ &pinctrl {
 	pinctrl-names = "default";
 	pinctrl-0 = <&rtc_32k>;
 
+	lcd {
+		lcd_control: lcd-control {
+			rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,
+				       <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	sdmmc {
 		sd_vcc_en: sd-vcc-en {
 			rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -183,6 +198,10 @@ &pwm0 {
 	status = "okay";
 };
 
+&pwm1 {
+	status = "okay";
+};
+
 &sdio {
 	#address-cells = <1>;
 	#size-cells = <0>;
@@ -216,6 +235,40 @@ &sdmmc {
 	status = "okay";
 };
 
+&spi2 {
+	assigned-clocks = <&cru SCLK_SPI2>;
+	assigned-clock-parents = <&cru PLL_DPLL>;
+	assigned-clock-rates = <100000000>;
+	status = "okay";
+
+	display@0 {
+		compatible = "dfrobot,unihiker-m10-display", "panel-mipi-dbi-spi";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&lcd_control>;
+		dc-gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>;
+		/* The DBI reset helper drives logical low, then high. */
+		reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
+		backlight = <&backlight>;
+		format = "r5g6b5";
+		width-mm = <43>;
+		height-mm = <58>;
+
+		panel-timing {
+			clock-frequency = <0>;
+			hactive = <240>;
+			vactive = <320>;
+			hback-porch = <0>;
+			hfront-porch = <0>;
+			hsync-len = <0>;
+			vback-porch = <0>;
+			vfront-porch = <0>;
+			vsync-len = <0>;
+		};
+	};
+};
+
 &u2phy {
 	status = "okay";
 };
Signature · 1 line
2.56.0
#4 lore raw

Re: [PATCH 2/2] arm64: dts: rockchip: Enable display on UNIHIKER M10 V1.2

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] dt-bindings: missing schema definition for 'dfrobot,unihiker-m10-display' --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: missing schema definition for 'dfrobot,unihiker-m10-display' --

commit 6e141ce95f426918ca0341028cd073760d1b80d9
Author: Miotsuki Mizuno <[email protected]>

arm64: dts: rockchip: Enable display on UNIHIKER M10 V1.2

This commit enables the onboard SPI display for the UNIHIKER M10 V1.2 board. It adds device tree nodes for the backlight, LCD control pins, and the SPI display itself along with its timing and required properties.

Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3308-unihiker-m10-v1.2.dts +0 -0
index 270ea970c95a7..a3264ef23746e 100644

[ ... ]

arch/arm64/boot/dts/rockchip/rk3308-unihiker-m10-v1.2.dts &sdmmc { · line 240

Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3308-unihiker-m10-v1.2.dts +8 -0
@@ -211,6 +230,40 @@ &sdmmc {
 	status = "okay";
 };
 
+&spi2 {
+	assigned-clocks = <&cru SCLK_SPI2>;
+	assigned-clock-parents = <&cru PLL_DPLL>;
+	assigned-clock-rates = <100000000>;
+	status = "okay";
+
+	display@0 {
+		compatible = "dfrobot,unihiker-m10-display", "panel-mipi-dbi-spi";

[Severity: Low]
Will make dtbs_check report a validation failure here?

The panel-mipi-dbi-spi driver parses the first compatible string to construct the firmware filename, but the corresponding schema located at Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml enforces an explicit list of valid compatible strings via an enum.

Since dfrobot,unihiker-m10-display does not appear to be added to the schema, does this violate the DT binding rules?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#5 lore raw
In reply to Miotsuki Mizuno
Quoted 8 lines · 在 2026-10-10六的 23:28 +0000,Miotsuki Mizuno写道:

Describe the onboard 240x320 RGB565 display with panel-mipi-dbi. The series adds the panel compatible and enables SPI2, GPIO reset/D-C and the PWM1 backlight. It uses the existing DRM and SPI drivers.

This series is based on the separate board I2C2 preparation commit. The prerequisite board patch was submitted separately:
https://lore.kernel.org/r/[email protected]
It does not depend on the pending NS2009 driver or binding.

I just came across here via mailing list.

It seems that NS2009 is designed to be mostly compatible with TI TSC2007, and the TSC2007 driver should be able to made work with minimal effort.

Thanks,
Icenowy

Quoted 49 lines

The 132-byte initialization firmware is available from:
https://github.com/mio-tsuki/panel-mipi-dbi-firmware/releases/tag/v1.0.0
Required filename: dfrobot,unihiker-m10-display.bin SHA256:
50412ae6d29c5bbfb7fac585528a761fb249d7944011a1b19c5e0f80a0418e5f The test kernel embeds it with CONFIG_EXTRA_FIRMWARE. Public release does not imply linux-firmware acceptance.

The nominal active area is 43.2 x 57.6 mm, represented as 43 x 58 mm. The published V1.3 schematic is not used as evidence for V1.2 supply connections; optional power/io supply properties are omitted.

SPI2 input is assigned 100 MHz. Active transfer register readback showed BAUDR=2, corresponding to 50 MHz. No oscilloscope measurement is claimed. GPIO_ACTIVE_HIGH reset matches the existing DRM helper and leaves the physical reset pin HIGH after initialization.

Built against Rockchip v7.4-armsoc/dts64, commit ae965b9856f033145e292b0c29082a26bcc45efd. Target DTS/schema, binding examples and strict checkpatch checks passed.
The exact display DTS booted through normal U-Boot three times in this
retest with the original test kernel, without pstore instrumentation, clk_ignore_unused or regulator_ignore_unused. Physical corner patterns
were confirmed; full and partial updates and five DRM disable/enable cycles completed. The exact display/touch combination also booted and its physical output was confirmed.

Earlier boots reset during early userspace; one partial USB log recorded
an instruction abort. This was not reproduced in the latest retest. The resets may have resulted from accidental contact with a loose jumper wire during reboot. The cause has not been established, and no software fix is claimed.
Exact-DTS cold boot and deep suspend/resume have not been tested.

Mizuno Miotsuki (2):
  dt-bindings: display: panel-mipi-dbi-spi: Add UNIHIKER M10 display
  arm64: dts: rockchip: Enable display on UNIHIKER M10 V1.2

 .../display/panel/panel-mipi-dbi-spi.yaml     |  1 + .../dts/rockchip/rk3308-unihiker-m10-v1.2.dts | 53
+++++++++++++++++++

 2 files changed, 54 insertions(+)

base-commit: f4f7ecd2e0e8debcbab4789717cc79d570d665e3