]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: rockchip: Add Powkiddy RGB20SX
authorChris Morgan <macromorgan@hotmail.com>
Tue, 1 Oct 2024 15:40:16 +0000 (10:40 -0500)
committerHeiko Stuebner <heiko@sntech.de>
Wed, 2 Oct 2024 08:24:41 +0000 (10:24 +0200)
The Powkiddy RGB20SX is a portable game console extremely similar to
the existing RGB30 console. The key differences from the RGB30 are
as follows:

 - Realtek RTW8723DS WiFi and Bluetooth.
 - UART pads for debug console (UART2).
 - A function button (ADC channel 0).
 - A much larger battery (5000 mAh).

Otherwise, the device is identical to the RGB30, including the
hard-coded value on ADC channel 1 used to identify the device at
runtime.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20241001154016.87386-3-macroalpha82@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/Makefile
arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb20sx.dts [new file with mode: 0644]

index 423cc6866a43bd79594841eafb7dbf60f36fa57f..d9e66bb1c77158dfd5fab1db7ea836dce06003dd 100644 (file)
@@ -91,6 +91,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinetab2-v0.1.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinetab2-v2.0.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rgb10max3.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rgb20sx.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rgb30.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rk2023.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-x55.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb20sx.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb20sx.dts
new file mode 100644 (file)
index 0000000..9b70026
--- /dev/null
@@ -0,0 +1,89 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3566-powkiddy-rk2023.dtsi"
+
+/ {
+       model = "Powkiddy RGB20SX";
+       compatible = "powkiddy,rgb20sx", "rockchip,rk3566";
+
+       chosen: chosen {
+               stdout-path = "serial2:1500000n8";
+       };
+
+       adc_keys: adc-keys {
+               compatible = "adc-keys";
+               io-channels = <&saradc 0>;
+               io-channel-names = "buttons";
+               keyup-threshold-microvolt = <1800000>;
+               poll-interval = <60>;
+
+               /*
+                * Button is labelled as FN, but according to input
+                * guidelines it should be mode.
+                */
+               button-mode {
+                       label = "MODE";
+                       linux,code = <BTN_MODE>;
+                       press-threshold-microvolt = <1750>;
+               };
+       };
+};
+
+&battery {
+       charge-full-design-microamp-hours = <5000000>;
+};
+
+&bluetooth {
+       compatible = "realtek,rtl8723ds-bt";
+};
+
+&cru {
+       assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
+                         <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
+       assigned-clock-rates = <32768>, <1200000000>,
+                              <200000000>, <292500000>;
+};
+
+&dsi0 {
+       panel: panel@0 {
+               compatible = "powkiddy,rgb30-panel";
+               reg = <0>;
+               backlight = <&backlight>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&lcd_rst>;
+               reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>;
+               vcc-supply = <&vcc3v3_lcd0_n>;
+               iovcc-supply = <&vcc3v3_lcd0_n>;
+
+               port {
+                       mipi_in_panel: endpoint {
+                               remote-endpoint = <&mipi_out_panel>;
+                       };
+               };
+       };
+};
+
+&i2c0 {
+       vdd_cpu: regulator@1c {
+               compatible = "tcs,tcs4525";
+               reg = <0x1c>;
+               fcs,suspend-voltage-selector = <1>;
+               regulator-min-microvolt = <712500>;
+               regulator-max-microvolt = <1390000>;
+               regulator-name = "vdd_cpu";
+               regulator-ramp-delay = <2300>;
+               vin-supply = <&vcc_sys>;
+               regulator-state-mem {
+                       regulator-off-in-suspend;
+               };
+       };
+};
+
+&uart2 {
+       status = "okay";
+};