Skip to contentSkip to conversation

Add Support for Anbernic RG351V

PATCH Applied Chris Morgan 3 participants 6 messages Nov 20, 2023 – Dec 12, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Add Support for Anbernic RG351V

From: Chris Morgan <[email protected]>

Add support for the Anbernic RG351V handheld gaming console.

Chris Morgan (3):
dt-bindings: arm: rockchip: Add Anbernic RG351V
arm64: dts: rockchip: Split RG351M from Odroid Go Advance
arm64: dts: rockchip: Add Anbernic RG351V

 .../devicetree/bindings/arm/rockchip.yaml     |   6 +-
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../dts/rockchip/rk3326-anbernic-rg351m.dts   |  18 +-
 .../dts/rockchip/rk3326-anbernic-rg351m.dtsi  | 478 ++++++++++++++++++
 .../dts/rockchip/rk3326-anbernic-rg351v.dts   |  44 ++
 5 files changed, 529 insertions(+), 18 deletions(-)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dtsi
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/3 dt-bindings: arm: rockchip: Add Anbernic RG351V

From: Chris Morgan <[email protected]>

The Anbernic RG351V is a portable gaming console from Anbernic with the RK3326 SoC.

---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/arm/rockchip.yaml +4 -2
index 5f7c6c4aad8f..3786f901a1a7 100644
@@ -30,9 +30,11 @@ properties:
           - const: amarula,vyasa-rk3288
           - const: rockchip,rk3288
 
-      - description: Anbernic RG351M
+      - description: Anbernic RK3326 Handheld Gaming Console
         items:
-          - const: anbernic,rg351m
+          - enum:
+              - anbernic,rg351m
+              - anbernic,rg351v
           - const: rockchip,rk3326
 
       - description: Anbernic RG353P
Signature · 1 line
2.34.1
#3 lore raw

PATCH 2/3 arm64: dts: rockchip: Split RG351M from Odroid Go Advance

In reply to Chris Morgan

From: Chris Morgan <[email protected]>

Split the RG351M into its own DTSI file. The RG351M, unlike the Odroid Go Advance, has no ADC joysticks, no GPIO buttons (except for volume on the RG351V), a PWM vibrator that interferes with an Odroid regulator, and different LEDs. Split the RG351M into a DTSI file that can then be imported into the DTS files for the RG351M and a new RG351V.

---
 .../dts/rockchip/rk3326-anbernic-rg351m.dts   |  18 +-
 .../dts/rockchip/rk3326-anbernic-rg351m.dtsi  | 478 ++++++++++++++++++
 2 files changed, 480 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dtsi
arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts +2 -16
index ce318e05f0a6..f4d20f29c1b4 100644
@@ -6,30 +6,16 @@
  */
 
 /dts-v1/;
-#include "rk3326-odroid-go.dtsi"
+#include "rk3326-anbernic-rg351m.dtsi"
 
 / {
 	model = "Anbernic RG351M";
 	compatible = "anbernic,rg351m", "rockchip,rk3326";
-
-	vibrator {
-		compatible = "pwm-vibrator";
-		pwms = <&pwm0 0 1000000 0>;
-		pwm-names = "enable";
-	};
 };
 
-/delete-node/ &builtin_gamepad;
-/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */
-
 &internal_display {
 	compatible = "elida,kd35t133";
 	iovcc-supply = <&vcc_lcd>;
+	rotation = <270>;
 	vdd-supply = <&vcc_lcd>;
 };
-
-&pwm0 {
-	status = "okay";
-};
-
-/delete-node/ &rk817_charger;
arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dtsi new file +478 -0

478 lines not on this page · raw message

Signature · 1 line
2.34.1
#4 lore raw

PATCH 3/3 arm64: dts: rockchip: Add Anbernic RG351V

In reply to Chris Morgan

From: Chris Morgan <[email protected]>

Add support for the Anbernic RG351V, which is a handheld gaming console from Anbernic with an RK3326 SoC, a 640x480 LCD display, a single analog joystick with several face buttons, two USB C ports, and internal WiFi over USB. All hardware has been tested as working except for the battery, which will require further modification to the mainline rk817 battery driver before it can be used (the device was built without a shunt resistor, and as such the battery cannot measure current; only voltage).

---
 arch/arm64/boot/dts/rockchip/Makefile         |  1 +
 .../dts/rockchip/rk3326-anbernic-rg351v.dts   | 44 +++++++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index a18f33bf0c0e..0ac27cf782d7 100644
@@ -9,6 +9,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351m.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351v.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb
arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351v.dts new file +44 -0

44 lines not on this page · raw message

Signature · 1 line
2.34.1
maintainer Applied
#5 lore raw
In reply to Chris Morgan
Quoted 10 lines · Chris Morgan

From: Chris Morgan <[email protected]>

Add support for the Anbernic RG351V handheld gaming console.

Chris Morgan (3):
dt-bindings: arm: rockchip: Add Anbernic RG351V
arm64: dts: rockchip: Split RG351M from Odroid Go Advance
arm64: dts: rockchip: Add Anbernic RG351V

[...]

Applied, thanks!

[1/3] dt-bindings: arm: rockchip: Add Anbernic RG351V

      commit: cc9f1f36f114e5aa67b0cefa8807c83afd5da323
[2/3] arm64: dts: rockchip: Split RG351M from Odroid Go Advance
      commit: 488a3a537fe7f638a7e4e6c738f52b9266cbb0e9
[3/3] arm64: dts: rockchip: Add Anbernic RG351V
      commit: dc6886afad610788d611782d3e87eebda66f7134

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>