Skip to contentSkip to conversation

Add devicetree for the Graperain G3568 v2

PATCH Superseded Coia Prant 3 participants 9 messages Jun 30 – Jul 9

Subsystems (2)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Coia Prant

author
#0 lore raw

v2 cover Add devicetree for the Graperain G3568 v2

Changes in v2:
- Fix trailing whitespaces and other formatting issues.

Notes/Unchanged from v1:
- ADC keys have been verified with evtest and works fine; kept unchanged.
- The 'regulator-off-in-suspend' property for vqmmc-supply is retained. This is a known issue shared by most similar boards and should be addressed globally later.

Planned future changes (to be both with the similar X3568 v4 board series):
- Replace the legacy 'gpio' label with 'gpios'.
- Add the Bluetooth UART child node.

Coia Prant (3):
dt-bindings: vendor-prefixes: Add graperain
dt-bindings: arm: rockchip: Add Graperain G3568 series
arm64: dts: rockchip: Add devicetree for the Graperain G3568 v2

 .../devicetree/bindings/arm/rockchip.yaml     |   6 +
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../rockchip/rk3568-graperain-g3568-v2.dts    | 894 ++++++++++++++++++
 4 files changed, 903 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts
Signature · 1 line
2.47.3
author
#1 lore raw

PATCH v2 1/3 dt-bindings: vendor-prefixes: Add graperain

Add graperain to the vendor prefixes.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 396044f368e7c..641a37c0debc9 100644
@@ -682,6 +682,8 @@ patternProperties:
     description: Goramo Gorecki
   "^gplus,.*":
     description: GPLUS
+  "^graperain,.*":
+    description: Shenzhen Graperain Technology Co., Ltd.
   "^grinn,.*":
     description: Grinn
   "^grmn,.*":
Signature · 1 line
2.47.3
#2 lore raw

Re: [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add graperain

Quoted 10 lines · Coia Prant

Add graperain to the vendor prefixes.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

<form letter>
This is a friendly reminder during the review process.

It looks like you received a tag and forgot to add it.

If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions of patchset, under or above your Signed-off-by tag, unless patch changed significantly (e.g. new properties added to the DT bindings). Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply.

Please read:
https://elixir.bootlin.com/linux/v6.12-rc3/source/Documentation/process/submitting-patches.rst#L577

If a tag was not added on purpose, please state in the patch changelog or cover letter why and what changed.
</form letter>

Best regards,
Krzysztof

author
#3 lore raw

Re: [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add graperain

Quoted 29 lines · Krzysztof Kozlowski
Quoted 10 lines · Coia Prant

Add graperain to the vendor prefixes.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

<form letter>
This is a friendly reminder during the review process.

It looks like you received a tag and forgot to add it.

If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions of patchset, under or above your Signed-off-by tag, unless patch changed significantly (e.g. new properties added to the DT bindings). Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply.

Please read:
https://elixir.bootlin.com/linux/v6.12-rc3/source/Documentation/process/submitting-patches.rst#L577

Quoted 7 lines

If a tag was not added on purpose, please state in the patch changelog or cover letter why and what changed.
</form letter>

Best regards,
Krzysztof

My apologies! I am quite new to the kernel submission process and missed picking up the tag from v1.

Since I need to spin a v3 anyway to fix the text wrapping issue in patch 2, I will make sure to include the missing tags and resend the entire series.

Thanks for your patience and for pointing this out!

Best,
Coia

author
#4 lore raw

PATCH v2 2/3 dt-bindings: arm: rockchip: Add Graperain G3568 series

In reply to Coia Prant

Document Graperain G3568 v2
which is a development board based on RK3568 SoC.

This series also have an SBC series with the suffix "box".

This board is development board series, not SBC series.

---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +6 -0
index 1a9dde18626d0..9eb2f66ba3856 100644
@@ -684,6 +684,12 @@ properties:
           - const: google,veyron
           - const: rockchip,rk3288
 
+      - description: Graperain G3568 series board
+        items:
+          - enum:
+              - graperain,g3568-v2
+          - const: rockchip,rk3568
+
       - description: H96 Max V58 TV Box
         items:
           - const: haochuangyi,h96-max-v58
Signature · 1 line
2.47.3
#5 lore raw

Re: [PATCH v2 2/3] dt-bindings: arm: rockchip: Add Graperain G3568 series

Quoted 2 lines · Coia Prant

Document Graperain G3568 v2
which is a development board based on RK3568 SoC.

Broken wrapping.

Best regards,
Krzysztof

author
#6 lore raw

Re: [PATCH v2 2/3] dt-bindings: arm: rockchip: Add Graperain G3568 series

Quoted 9 lines · Krzysztof Kozlowski
Quoted 2 lines · Coia Prant

Document Graperain G3568 v2
which is a development board based on RK3568 SoC.

Broken wrapping.

Best regards,
Krzysztof

Acknowledged. I will fix the text wrapping and clean up the commit message in the v3 submission.

Thanks for pointing it out!

author
#7 lore raw

PATCH v2 3/3 arm64: dts: rockchip: Add devicetree for the Graperain G3568 v2

In reply to Coia Prant

The Graperain G3568 v2 is an RK3568-based development board, just like
the RK3568-EVB.
It always uses soldered connections between the GR3568CV2 core board and
the RK3568BV2/GR3568BV2 I/O board.

The G3568 board has multiple hardware revisions, and we currently
support v2 (I/O board).

Specification:
- SoC: RockChip RK3568 ARM64 (4 cores)
- eMMC: 16-128 GB
- RAM: 2-16 GB
- Power: DC 12V 2A
- Ethernet: 2x RTL8211F RGMII (10/100/1000 Mbps)
- Wireless radio: 802.11b/g/n/ac dual-band
- LED:
Power: AlwaysOn
User: GPIO
- Button:
ESC: SARADC/0 <1100k µV>
MENU: SARADC/0 <1400k µV>
VOL-: SARADC/0 <430k µV>
VOL+: SARADC/0 <50k µV>
Power/Reset: PMIC RK809
- CAN
CAN/1: 4-pin (PH 2.0)
- PWM
PWM/4: Backlight
PWM/5: Backlight
PWM/7: IR Receiver
- UART:
UART/2: Debug TTL - 1500000 8N1 (1.25mm)
UART/3: TTL (PH 2.0)
UART/4: TTL (PH 2.0)
UART/8: AP6356S Bluetooth
UART/9: TTL (PH 2.0)
- I2C:
I2C/0: PMIC RK809
I2C/1: Touchscreen
I2C/4: Camera
I2C/5: RTC@51 PCF8563
- I2S:
I2S/0: HDMI Sound
I2S/1: RK809 Audio Codec
I2S/3: AP6356S Bluetooth Sound
- SDMMC:
SDMMC/0: microSD (TF) slot
SDMMC/2: AP6356S SDIO WiFi card
- Camera: 1x CSI
- Video: HDMI / DSI0 (MIPI/LVDS) / DSI1 (MIPI/EDP)
- Audio: HDMI / MIC / Speaker / SPDIF / 3.5mm Headphones / AP6356S Bluetooth
- USB:
USB 2.0 HOST x2
USB 2.0 OTG x1 (shared with USB 3.0 OTG/HOST)
USB 3.0 HOST x1
USB 3.0 OTG/HOST x1
- SATA: 1x SATA 3.0 with Power/4-pin
- PCIe: 1x PCIe 3.0 x2 (x4 connecter)

Link:
- https://image.chukouplus.com/upload/C_153/product_file/20211022/6daddec9e400458816dd4c57ba807fc3.pdf
- https://blog.gov.cooking/archives/research-graperain-g3568-v2-and-flash.html

---
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../rockchip/rk3568-graperain-g3568-v2.dts    | 894 ++++++++++++++++++
 2 files changed, 895 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index 761d82b4f4f2a..6e9d049e8ddaf 100644
@@ -144,6 +144,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-easepi-r1.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r68s.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-graperain-g3568-v2.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-hinlink-h66k.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-hinlink-h68k.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-lubancat-2.dtb
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +894 -0

894 lines not on this page · raw message

Signature · 1 line
2.47.3
#8 lore raw

Re: [PATCH v2 3/3] arm64: dts: rockchip: Add devicetree for the Graperain G3568 v2

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] The `press-threshold-microvolt` values for the ADC keys are incorrectly set to the midpoints…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The press-threshold-microvolt values for the ADC keys are incorrectly set to the midpoints instead of the nominal voltages, breaking the closest-match logic.
- [Medium] The uart8 pinmux configuration for the AP6356S Bluetooth module omits the RTS pin, breaking hardware flow control.
--

commit fa96250010d1434d5bd9c7fed26ebc77f8c2f9f1
Author: Coia Prant <[email protected]>

arm64: dts: rockchip: Add devicetree for the Graperain G3568 v2

This patch adds support for the Graperain G3568 v2, an RK3568-based development board. It defines the device tree including CPU, memory, network, wireless, storage, display, and standard IO interfaces.

Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +1 -0
new file mode 100644
index 0000000000000..221992d6c6003
@@ -0,0 +1,894 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

[ ... ]

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +8 -0
+	adc-keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 0>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <1800000>;
+		poll-interval = <100>;
+
+		button-esc {

arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts line 45

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +10 -0
+			label = "esc";
+			linux,code = <KEY_ESC>;
+			press-threshold-microvolt = <1250000>;
+		};
+
+		button-menu {
+			label = "menu";
+			linux,code = <KEY_MENU>;
+			press-threshold-microvolt = <1600000>;
+		};

[Severity: Medium]
Are these threshold values correct? The commit message declares nominal voltages (e.g., 1.1V for ESC and 1.4V for MENU), but the values here seem to be configured to the midpoints.

The adc-keys driver dynamically matches the read voltage to the closest defined threshold. By configuring midpoints instead of actual nominal voltages, the distance calculations can become skewed.

For example, when the MENU key (nominal 1.4V) is pressed, its distance to the configured MENU threshold (1.6V) is 200mV, but its distance to the ESC threshold (1.25V) is only 150mV.

Won't the driver incorrectly register the MENU key as ESC?

Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +12 -0
+		button-vol-down {
+			label = "volume down";
+			linux,code = <KEY_VOLUMEDOWN>;
+			press-threshold-microvolt = <600000>;
+		};
+
+		button-vol-up {
+			label = "volume up";
+			linux,code = <KEY_VOLUMEUP>;
+			press-threshold-microvolt = <100000>;
+		};
+	};

[ ... ]

arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts line 819

Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +5 -0
+/* used for WiFi/BT AP6356S */
+&uart8 {
+	pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
+	status = "okay";
+};

[Severity: Medium]
Does this UART configuration omit the RTS pin (&uart8m0_rtsn)?

High-speed Bluetooth modules like the AP6356S require hardware flow control to prevent packet loss. Without the host RTS pin explicitly muxed, the Bluetooth module may receive an invalid or floating RTS signal.

Could this prevent it from successfully transmitting data to the host or cause buffer overflows when hardware flow control is utilized?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3