Skip to contentSkip to conversation

dt-bindings: vendor-prefixes: Add graperain

PATCH Superseded Coia Prant 3 participants 8 messages Jun 27 – Jun 29

Subsystems (2)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Coia Prant

author
#0 lore raw

PATCH 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 396044f36..641a37c0d 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
author
#1 lore raw

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

This documents 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 1a9dde186..873d41bff 100644
@@ -683,6 +683,12 @@ properties:
           - const: google,veyron-tiger
           - 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:
Signature · 1 line
2.47.3
#2 lore raw

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

Quoted 1 line · Coia Prant

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

"Document"

Please do not use "This commit/patch/change", but imperative mood. See longer explanation here:
https://elixir.bootlin.com/linux/v6.16/source/Documentation/process/submitting-patches.rst#L94

Quoted 4 lines

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

This board is development board series, not SBC series.

Remember to also address Sashiko review.

Quoted 15 lines
---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +0 -0
index 1a9dde186..873d41bff 100644

Documentation/devicetree/bindings/arm/rockchip.yaml properties: · line 686

Quoted 4 lines
Documentation/devicetree/bindings/arm/rockchip.yaml +1 -0
@@ -683,6 +683,12 @@ properties:
           - const: google,veyron-tiger
           - const: google,veyron
           - const: rockchip,rk3288
+      

Looks like you just added bunch of format-patch and check-patch warnings...

Best regards,
Krzysztof

author
#3 lore raw

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

Quoted 8 lines · Krzysztof Kozlowski
Quoted 1 line · Coia Prant

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

"Document"

Please do not use "This commit/patch/change", but imperative mood. See longer explanation here:
https://elixir.bootlin.com/linux/v6.16/source/Documentation/process/submitting-patches.rst#L94

Thank you for pointing this out. I have revised the commit message to use imperative mood and split the overlong line to stay within 75 characters.

Quoted 5 lines
Quoted 3 lines

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

This board is development board series, not SBC series.

Remember to also address Sashiko review.

Okay.

Quoted 8 lines
Quoted 5 lines
Link ...
Signed-off-by ...

---
...
+

Looks like you just added bunch of format-patch and check-patch warnings...

I have re‑run checkpatch on the entire series and fixed all trailing whitespace and other formatting issues. The patch set should now be clean (except for a hardware‑list line in the third patch which I kept intact for readability).

Apologies for the oversight – it was late night work.

I will send a v2 with all fixes shortly.

Best,
Coia

author
#4 lore raw

PATCH 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 761d82b4f..6e9d049e8 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
#5 lore raw

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

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider: - [Medium] Incorrect `press-threshold-microvolt` values in `adc-keys` use boundary midpoints instead of…

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [Medium] Incorrect press-threshold-microvolt values in adc-keys use boundary midpoints instead of nominal voltages, causing the MENU button to misregister as ESC.
- [Medium] The WiFi SDIO interface specifies keep-power-in-suspend, but its I/O voltage supply (vcc_1v8) is configured to turn off in suspend, breaking Wake-on-WLAN.
- [Medium] The AP6356S Bluetooth UART is missing hardware flow control properties and the required Bluetooth child node.
- [Low] The deprecated gpio property is used instead of gpios in fixed regulator nodes.
--

commit 13181564cb78799e1d57eb0995588d8e839f22a5
Author: Coia Prant <[email protected]>
arm64: dts: rockchip: Add devicetree for the Graperain G3568 v2

This patch introduces the device tree for the Graperain G3568 v2, an RK3568 based development board. It configures the hardware peripherals including ethernet, storage, wireless, and power regulators.

Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +0 -0
new file mode 100644
index 0000000000000..221992d6c6003
@@ -0,0 +1,894 @@

[ ... ]

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

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

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

[Severity: Medium]
Will this cause the menu button to misregister as esc?

The adc-keys driver uses a nearest-neighbor algorithm to match the ADC reading to the button. Since the commit message indicates the nominal voltages are 1.1V for ESC and 1.4V for MENU, an ADC reading of 1.4V from pressing MENU is closer to the ESC threshold of 1.25V (0.15V difference) than the MENU threshold of 1.6V (0.2V difference).

Could we use the exact expected nominal voltages here instead of the boundary midpoints?

[ ... ]

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

Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +4 -0
+	vcc5v0_usb_host: regulator-vcc5v0-usb-host {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;

[Severity: Low]
Is this using the deprecated gpio property?

The standard regulator-fixed binding expects gpios instead of gpio, which can cause device tree schema validation warnings.

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

Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +12 -0
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc5v0_usb_host_en>;
+		regulator-name = "vcc5v0_usb_host";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc5v0_usb>;
+	};
+
+	vcc5v0_usb_otg: regulator-vcc5v0-usb-otg {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;

[Severity: Low]
Would it be better to use the gpios property here as well to match the regulator-fixed device tree binding schema?

[ ... ]

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

Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +13 -0
+/* used for AP6356S WiFi */
+&sdmmc2 {
+	bus-width = <4>;
+	cap-sd-highspeed;
+	cap-sdio-irq;
+	keep-power-in-suspend;
+	mmc-pwrseq = <&sdio_pwrseq>;
+	non-removable;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
+	sd-uhs-sdr104;
+	vmmc-supply = <&vcc3v3_sys>;
+	vqmmc-supply = <&vcc_1v8>;

[Severity: Medium]
Will this configuration break Wake-on-WLAN and SDIO communication on resume?

This node specifies keep-power-in-suspend, but the vqmmc-supply is set to vcc_1v8. Looking at the vcc_1v8 regulator definition (DCDC_REG5) earlier in the file, it is configured with regulator-off-in-suspend.

Cutting power to the SDIO I/O domain during suspend violates the power sequencing for keep-power-in-suspend and prevents out-of-band wake interrupts from signaling the host.

[ ... ]

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 Bluetooth UART configuration need hardware flow control and a device child node?

High-speed Bluetooth modules like the AP6356S generally rely on RTS/CTS to prevent buffer overflows, but the uart-has-rtscts property and the uart8m0_rtsn pin configuration are missing here.

Additionally, without a bluetooth child node (such as compatible = "brcm,bcm4345c5"), the kernel's HCI UART driver might not be able to probe and initialize the module automatically.

[ ... ]

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

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

Quoted 131 lines · <[email protected]> 于2026年6月28日周日 07:08写道:

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [Medium] Incorrect press-threshold-microvolt values in adc-keys use boundary midpoints instead of nominal voltages, causing the MENU button to misregister as ESC.
- [Medium] The WiFi SDIO interface specifies keep-power-in-suspend, but its I/O voltage supply (vcc_1v8) is configured to turn off in suspend, breaking Wake-on-WLAN.
- [Medium] The AP6356S Bluetooth UART is missing hardware flow control properties and the required Bluetooth child node.
- [Low] The deprecated gpio property is used instead of gpios in fixed regulator nodes.
--

commit 13181564cb78799e1d57eb0995588d8e839f22a5
Author: Coia Prant <[email protected]>
arm64: dts: rockchip: Add devicetree for the Graperain G3568 v2

This patch introduces the device tree for the Graperain G3568 v2, an RK3568 based development board. It configures the hardware peripherals including ethernet, storage, wireless, and power regulators.

Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +0 -0
new file mode 100644
index 0000000000000..221992d6c6003
@@ -0,0 +1,894 @@

[ ... ]

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

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

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

[Severity: Medium]
Will this cause the menu button to misregister as esc?

The adc-keys driver uses a nearest-neighbor algorithm to match the ADC reading to the button. Since the commit message indicates the nominal voltages are 1.1V for ESC and 1.4V for MENU, an ADC reading of 1.4V from pressing MENU is closer to the ESC threshold of 1.25V (0.15V difference) than the MENU threshold of 1.6V (0.2V difference).

Could we use the exact expected nominal voltages here instead of the boundary midpoints?

[ ... ]

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

Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +4 -0
+     vcc5v0_usb_host: regulator-vcc5v0-usb-host {
+             compatible = "regulator-fixed";
+             enable-active-high;
+             gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;

[Severity: Low]
Is this using the deprecated gpio property?

The standard regulator-fixed binding expects gpios instead of gpio, which can cause device tree schema validation warnings.

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

Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +12 -0
+             pinctrl-names = "default";
+             pinctrl-0 = <&vcc5v0_usb_host_en>;
+             regulator-name = "vcc5v0_usb_host";
+             regulator-min-microvolt = <5000000>;
+             regulator-max-microvolt = <5000000>;
+             vin-supply = <&vcc5v0_usb>;
+     };
+
+     vcc5v0_usb_otg: regulator-vcc5v0-usb-otg {
+             compatible = "regulator-fixed";
+             enable-active-high;
+             gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;

[Severity: Low]
Would it be better to use the gpios property here as well to match the regulator-fixed device tree binding schema?

[ ... ]

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

Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3568-graperain-g3568-v2.dts new file +13 -0
+/* used for AP6356S WiFi */
+&sdmmc2 {
+     bus-width = <4>;
+     cap-sd-highspeed;
+     cap-sdio-irq;
+     keep-power-in-suspend;
+     mmc-pwrseq = <&sdio_pwrseq>;
+     non-removable;
+     pinctrl-names = "default";
+     pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
+     sd-uhs-sdr104;
+     vmmc-supply = <&vcc3v3_sys>;
+     vqmmc-supply = <&vcc_1v8>;

[Severity: Medium]
Will this configuration break Wake-on-WLAN and SDIO communication on resume?

This node specifies keep-power-in-suspend, but the vqmmc-supply is set to vcc_1v8. Looking at the vcc_1v8 regulator definition (DCDC_REG5) earlier in the file, it is configured with regulator-off-in-suspend.

Cutting power to the SDIO I/O domain during suspend violates the power sequencing for keep-power-in-suspend and prevents out-of-band wake interrupts from signaling the host.

[ ... ]

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 Bluetooth UART configuration need hardware flow control and a device child node?

High-speed Bluetooth modules like the AP6356S generally rely on RTS/CTS to prevent buffer overflows, but the uart-has-rtscts property and the uart8m0_rtsn pin configuration are missing here.

Quoted 8 lines

Additionally, without a bluetooth child node (such as compatible = "brcm,bcm4345c5"), the kernel's HCI UART driver might not be able to probe and initialize the module automatically.

[ ... ]

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

Thanks for the thorough review.

Here are my responses to the issues raised:

1. ADC Keys threshold (Medium)

The current threshold values (1.25V for ESC and 1.6V for MENU) are intentionally set to midpoints, as the adc-keys driver uses a nearest-neighbor algorithm to match ADC readings. These midpoints provide the largest decision margin and minimize the risk of mis‑detection. I have verified the functionality with evtest, and the buttons are correctly recognized. Therefore, I will keep this configuration unchanged.

2. GPIO property in fixed regulators (Low)

This is correct that gpios is the preferred property now, and gpio is deprecated.
Since this board and the X3568 v4 share almost identical hardware, I plan to address this for both boards in a separate, follow‑up patch series to ensure consistency.

3. SDIO vqmmc-supply and regulator-off-in-suspend (Medium)

This is a valid concern. The configuration conflict between keep-power-in-suspend
and regulator-off-in-suspend is indeed problematic. However, this same pattern appears in many existing RK3568 board files and appears to be a historical mistake that has been copied across multiple devices. I believe this should be fixed systematically at the platform level rather than on a per‑board basis. Should we submit a separate patch series to clean up this issue for all RK3568?

4. Bluetooth UART flow control and child node (Medium)

Agreed that hardware flow control (uart-has-rtscts) and a Bluetooth child node are required for proper operation. Since this is a common requirement for similar board
(X3568 v4), I will address this in a separate follow‑up patch series
to improve consistency
across the platform.

If there are no more questions, I will submit PATCH v2.

Thanks.

Best,
Coia