devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] rockchip: Add Anbernic RG353PS
@ 2023-05-12 16:20 Chris Morgan
  2023-05-12 16:20 ` [PATCH 1/2] dt-bindings: arm: rockchip: add " Chris Morgan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chris Morgan @ 2023-05-12 16:20 UTC (permalink / raw)
  To: linux-rockchip
  Cc: devicetree, maccraft123mc, sebastian.reichel, jagan, heiko,
	conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add support for the Anbernic RG353PS, which is a cheaper variant of the
Anbernic RG353P.

Chris Morgan (2):
  dt-bindings: arm: rockchip: add Anbernic RG353PS
  arm64: dts: rockchip: add Anbernic RG353PS

 .../devicetree/bindings/arm/rockchip.yaml     |   5 +
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../dts/rockchip/rk3566-anbernic-rg353ps.dts  | 116 ++++++++++++++++++
 3 files changed, 122 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353ps.dts

-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] dt-bindings: arm: rockchip: add Anbernic RG353PS
  2023-05-12 16:20 [PATCH 0/2] rockchip: Add Anbernic RG353PS Chris Morgan
@ 2023-05-12 16:20 ` Chris Morgan
  2023-05-12 21:39   ` Conor Dooley
  2023-05-12 16:20 ` [PATCH 2/2] arm64: dts: " Chris Morgan
  2023-05-13 16:49 ` [PATCH 0/2] rockchip: Add " Heiko Stuebner
  2 siblings, 1 reply; 5+ messages in thread
From: Chris Morgan @ 2023-05-12 16:20 UTC (permalink / raw)
  To: linux-rockchip
  Cc: devicetree, maccraft123mc, sebastian.reichel, jagan, heiko,
	conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add devicetree binding for Anbernic RG353PS. This device is identical
to the RG353P, except it does not have a touchscreen, does not have
an eMMC, only includes 1GB of RAM, and ships with only the 2nd
revision panel based on a Sitronix ST7703 controller. Support for the
panel has been added in a separate commit.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
index ec141c937b8b..362df3f2a037 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.yaml
+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
@@ -40,6 +40,11 @@ properties:
           - const: anbernic,rg353p
           - const: rockchip,rk3566
 
+      - description: Anbernic RG353PS
+        items:
+          - const: anbernic,rg353ps
+          - const: rockchip,rk3566
+
       - description: Anbernic RG353V
         items:
           - const: anbernic,rg353v
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] arm64: dts: rockchip: add Anbernic RG353PS
  2023-05-12 16:20 [PATCH 0/2] rockchip: Add Anbernic RG353PS Chris Morgan
  2023-05-12 16:20 ` [PATCH 1/2] dt-bindings: arm: rockchip: add " Chris Morgan
@ 2023-05-12 16:20 ` Chris Morgan
  2023-05-13 16:49 ` [PATCH 0/2] rockchip: Add " Heiko Stuebner
  2 siblings, 0 replies; 5+ messages in thread
From: Chris Morgan @ 2023-05-12 16:20 UTC (permalink / raw)
  To: linux-rockchip
  Cc: devicetree, maccraft123mc, sebastian.reichel, jagan, heiko,
	conor+dt, krzysztof.kozlowski+dt, robh+dt, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add support for the Anbernic RG353PS. This device is identical in form
factor to the RG353P and has the following hardware differences:
 - No touchscreen is present on i2c2 (or at all).
 - Only contains 1GB of RAM.
 - Has no eMMC.
 - Only appears to ship with the 2nd revision of the display panel.

Note that the display panel has been added to the st7703 panel driver
in a separate commit series.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../dts/rockchip/rk3566-anbernic-rg353ps.dts  | 116 ++++++++++++++++++
 2 files changed, 117 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353ps.dts

diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 2d585bbb8f3a..b6f7158c4552 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -69,6 +69,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399pro-rock-pi-n10.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353p.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353ps.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353v.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353vs.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg503.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353ps.dts b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353ps.dts
new file mode 100644
index 000000000000..b211973e36c2
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353ps.dts
@@ -0,0 +1,116 @@
+// 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-anbernic-rg353x.dtsi"
+
+/ {
+	model = "RG353PS";
+	compatible = "anbernic,rg353ps", "rockchip,rk3566";
+
+	aliases {
+		mmc0 = &sdmmc0;
+		mmc1 = &sdmmc1;
+		mmc2 = &sdmmc2;
+	};
+
+	battery: battery {
+		compatible = "simple-battery";
+		charge-full-design-microamp-hours = <3472000>;
+		charge-term-current-microamp = <300000>;
+		constant-charge-current-max-microamp = <2000000>;
+		constant-charge-voltage-max-microvolt = <4200000>;
+		factory-internal-resistance-micro-ohms = <117000>;
+		voltage-max-design-microvolt = <4172000>;
+		voltage-min-design-microvolt = <3400000>;
+
+		ocv-capacity-celsius = <20>;
+		ocv-capacity-table-0 =  <4172000 100>, <4054000 95>, <3984000 90>, <3926000 85>,
+					<3874000 80>, <3826000 75>, <3783000 70>, <3746000 65>,
+					<3714000 60>, <3683000 55>, <3650000 50>, <3628000 45>,
+					<3612000 40>, <3600000 35>, <3587000 30>, <3571000 25>,
+					<3552000 20>, <3525000 15>, <3492000 10>, <3446000 5>,
+					<3400000 0>;
+	};
+
+	/* Channels reversed for both headphones and speakers. */
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "rk817_ext";
+		simple-audio-card,aux-devs = <&spk_amp>;
+		simple-audio-card,format = "i2s";
+		simple-audio-card,hp-det-gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
+		simple-audio-card,mclk-fs = <256>;
+		simple-audio-card,widgets =
+			"Microphone", "Mic Jack",
+			"Headphone", "Headphones",
+			"Speaker", "Internal Speakers";
+		simple-audio-card,routing =
+			"MICL", "Mic Jack",
+			"Headphones", "HPOL",
+			"Headphones", "HPOR",
+			"Internal Speakers", "Speaker Amp OUTL",
+			"Internal Speakers", "Speaker Amp OUTR",
+			"Speaker Amp INL", "HPOL",
+			"Speaker Amp INR", "HPOR";
+		simple-audio-card,pin-switches = "Internal Speakers";
+
+		simple-audio-card,codec {
+			sound-dai = <&rk817>;
+		};
+
+		simple-audio-card,cpu {
+			sound-dai = <&i2s1_8ch>;
+		};
+	};
+
+	spk_amp: audio-amplifier {
+		compatible = "simple-audio-amplifier";
+		enable-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
+		pinctrl-0 = <&spk_amp_enable_h>;
+		pinctrl-names = "default";
+		sound-name-prefix = "Speaker Amp";
+	};
+};
+
+&gpio_keys_control {
+	button-r1 {
+		gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
+		label = "TR";
+		linux,code = <BTN_TR>;
+	};
+
+	button-r2 {
+		gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
+		label = "TR2";
+		linux,code = <BTN_TR2>;
+	};
+};
+
+&panel {
+	compatible = "anbernic,rg353v-panel-v2";
+	iovcc-supply = <&vcc3v3_lcd0_n>;
+	vcc-supply = <&vcc3v3_lcd0_n>;
+	/delete-property/ vdd-supply;
+};
+
+&pinctrl {
+	audio-amplifier {
+		spk_amp_enable_h: spk-amp-enable-h {
+			rockchip,pins =
+				<4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};
+
+&rk817 {
+	rk817_charger: charger {
+		monitored-battery = <&battery>;
+		rockchip,resistor-sense-micro-ohms = <10000>;
+		rockchip,sleep-enter-current-microamp = <300000>;
+		rockchip,sleep-filter-current-microamp = <100000>;
+	};
+};
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] dt-bindings: arm: rockchip: add Anbernic RG353PS
  2023-05-12 16:20 ` [PATCH 1/2] dt-bindings: arm: rockchip: add " Chris Morgan
@ 2023-05-12 21:39   ` Conor Dooley
  0 siblings, 0 replies; 5+ messages in thread
From: Conor Dooley @ 2023-05-12 21:39 UTC (permalink / raw)
  To: Chris Morgan
  Cc: linux-rockchip, devicetree, maccraft123mc, sebastian.reichel,
	jagan, heiko, conor+dt, krzysztof.kozlowski+dt, robh+dt,
	Chris Morgan

[-- Attachment #1: Type: text/plain, Size: 1412 bytes --]

On Fri, May 12, 2023 at 11:20:38AM -0500, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add devicetree binding for Anbernic RG353PS. This device is identical
> to the RG353P, except it does not have a touchscreen, does not have
> an eMMC, only includes 1GB of RAM, and ships with only the 2nd
> revision panel based on a Sitronix ST7703 controller. Support for the
> panel has been added in a separate commit.
> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>

The see-through case looks kinda cool actually.
Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> ---
>  Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
> index ec141c937b8b..362df3f2a037 100644
> --- a/Documentation/devicetree/bindings/arm/rockchip.yaml
> +++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
> @@ -40,6 +40,11 @@ properties:
>            - const: anbernic,rg353p
>            - const: rockchip,rk3566
>  
> +      - description: Anbernic RG353PS
> +        items:
> +          - const: anbernic,rg353ps
> +          - const: rockchip,rk3566
> +
>        - description: Anbernic RG353V
>          items:
>            - const: anbernic,rg353v
> -- 
> 2.34.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] rockchip: Add Anbernic RG353PS
  2023-05-12 16:20 [PATCH 0/2] rockchip: Add Anbernic RG353PS Chris Morgan
  2023-05-12 16:20 ` [PATCH 1/2] dt-bindings: arm: rockchip: add " Chris Morgan
  2023-05-12 16:20 ` [PATCH 2/2] arm64: dts: " Chris Morgan
@ 2023-05-13 16:49 ` Heiko Stuebner
  2 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2023-05-13 16:49 UTC (permalink / raw)
  To: Chris Morgan, linux-rockchip
  Cc: Heiko Stuebner, devicetree, Chris Morgan, maccraft123mc,
	sebastian.reichel, jagan, robh+dt, krzysztof.kozlowski+dt,
	conor+dt

On Fri, 12 May 2023 11:20:37 -0500, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add support for the Anbernic RG353PS, which is a cheaper variant of the
> Anbernic RG353P.
> 
> Chris Morgan (2):
>   dt-bindings: arm: rockchip: add Anbernic RG353PS
>   arm64: dts: rockchip: add Anbernic RG353PS
> 
> [...]

Applied, thanks!

[1/2] dt-bindings: arm: rockchip: add Anbernic RG353PS
      commit: 4e959380ba823cdf4e643ff247b8359e1bcbf683
[2/2] arm64: dts: rockchip: add Anbernic RG353PS
      commit: 4d83538aab4ccb59abdbf7f39568761a8b7d7ea1

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-13 16:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-12 16:20 [PATCH 0/2] rockchip: Add Anbernic RG353PS Chris Morgan
2023-05-12 16:20 ` [PATCH 1/2] dt-bindings: arm: rockchip: add " Chris Morgan
2023-05-12 21:39   ` Conor Dooley
2023-05-12 16:20 ` [PATCH 2/2] arm64: dts: " Chris Morgan
2023-05-13 16:49 ` [PATCH 0/2] rockchip: Add " Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).