From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Andre Przywara <andre.przywara@arm.com>,
Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Samuel Holland <samuel@sholland.org>,
Chris Morgan <macromorgan@hotmail.com>,
Ryan Walklin <ryan@testtoast.com>
Cc: devicetree@vger.kernel.org, linux-sunxi@lists.linux.dev,
Ryan Walklin <ryan@testtoast.com>
Subject: Re: [PATCH v2 2/5] arm64: dts: allwinner: h700: Add RG35XX 2024 DTS
Date: Sun, 21 Apr 2024 22:01:45 +0200 [thread overview]
Message-ID: <2320236.ElGaqSPkdT@jernej-laptop> (raw)
In-Reply-To: <20240420104354.334947-8-ryan@testtoast.com>
Dne sobota, 20. april 2024 ob 12:43:56 GMT +2 je Ryan Walklin napisal(a):
> The base model RG35XX (2024) is a handheld gaming device based on an Allwinner H700 chip.
>
> The H700 is a H616 variant (4x ARM Cortex-A53 cores @ 1.5Ghz with Mali G31 GPU) which exposes RGB LCD and NMI pins.
>
> Device features:
> - Allwinner H700 @ 1.5GHz
> - 1GB LPDDR4 DRAM
> - X-Powers AXP717 PMIC
> - 3.5" 640x480 RGB LCD
> - Two microSD slots
> - Mini-HDMI out
> - GPIO keypad
> - 3.5mm headphone jack
>
> Enabled in this DTS:
> - AXP717 PMIC with regulators (interrupt controller TBC/TBD)
> - Power LED (charge LED on device controlled directly by PMIC)
> - Serial UART (accessible from PIN headers on the board)
> - MMC slots
>
> Changelog v1..v2:
> - Update copyright
> - Spaces -> Tabs
> - Add cpufreq support [1]
> - Remove MMC aliases
> - Fix GPIO button and regulator node names
> - Note unused AXP717 regulators
> - Update regulator for SD slots
> - Remove unused I2C3 device
> - Update NMI interrupt controller for AXP717 [2]
> - Add chassis-type
> - Address USB EHCI/OHCI0 correctly and add usb vbus supply
> - Add PIO vcc-pg-supply
> - Correct boost regulator voltage and name
>
> Signed-off-by: Ryan Walklin <ryan@testtoast.com>
>
> [1]: https://lore.kernel.org/linux-sunxi/20240419071450.7aiheeoyq35yjoo7@vireshk-i7/T/#t
> [2]: https://lore.kernel.org/linux-sunxi/20240418181615.1370179-1-macroalpha82@gmail.com/T/#t
Put changelog and links in this case below --- line, so it won't be part
of the commit.
Best regards,
Jernej
>
> Signed-off-by: Ryan Walklin <ryan@testtoast.com>
> ---
> .../sun50i-h700-anbernic-rg35xx-2024.dts | 375 ++++++++++++++++++
> 1 file changed, 375 insertions(+)
> create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
> new file mode 100644
> index 000000000000..d8081273677d
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
> @@ -0,0 +1,375 @@
> +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +/*
> + * Copyright (C) 2024 Ryan Walklin <ryan@testtoast.com>.
> + */
> +
> +/dts-v1/;
> +
> +#include "sun50i-h616.dtsi"
> +#include "sun50i-h616-cpu-opp.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/linux-event-codes.h>
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/leds/common.h>
> +
> +/ {
> + model = "Anbernic RG35XX 2024";
> + chassis-type = "handset";
> + compatible = "anbernic,rg35xx-2024", "allwinner,sun50i-h700";
> +
> + aliases {
> + serial0 = &uart0;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> +
> + led-0 {
> + function = LED_FUNCTION_POWER;
> + color = <LED_COLOR_ID_GREEN>;
> + gpios = <&pio 8 12 GPIO_ACTIVE_HIGH>; /* PI12 */
> + default-state = "on";
> + };
> + };
> +
> + gpio-keys {
> + compatible = "gpio-keys";
> +
> + button-up {
> + label = "D-Pad Up";
> + gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_DPAD_UP>;
> + };
> +
> + button-down {
> + label = "D-Pad Down";
> + gpios = <&pio 4 0 GPIO_ACTIVE_LOW>; /* PE0 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_DPAD_DOWN>;
> + };
> +
> + button-left {
> + label = "D-Pad left";
> + gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_DPAD_LEFT>;
> + };
> +
> + button-right {
> + label = "D-Pad Right";
> + gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_DPAD_RIGHT>;
> + };
> +
> + button-a {
> + label = "Action-Pad A";
> + gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_EAST>;
> + };
> +
> + button-b {
> + label = "Action-Pad B";
> + gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_SOUTH>;
> + };
> +
> + button-x {
> + label = "Action-Pad X";
> + gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_NORTH>;
> + };
> +
> + button-y {
> + label = "Action Pad Y";
> + gpios = <&pio 0 2 GPIO_ACTIVE_LOW>; /* PA2 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_WEST>;
> + };
> +
> + button-start {
> + label = "Key Start";
> + gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_START>;
> + };
> +
> + button-select {
> + label = "Key Select";
> + gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_SELECT>;
> + };
> +
> + button-l1 {
> + label = "Key L1";
> + gpios = <&pio 0 10 GPIO_ACTIVE_LOW>; /* PA10 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_TL>;
> + };
> +
> + button-l2 {
> + label = "Key L2";
> + gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_TL2>;
> + };
> +
> + button-r1 {
> + label = "Key R1";
> + gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_TR>;
> + };
> +
> + button-r2 {
> + label = "Key R2";
> + gpios = <&pio 0 7 GPIO_ACTIVE_LOW>; /* PA7 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_TR2>;
> + };
> +
> + button-menu {
> + label = "Key Menu";
> + gpios = <&pio 4 3 GPIO_ACTIVE_LOW>; /* PE3 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <BTN_MODE>;
> + };
> +
> + button-vol-up {
> + label = "Key Volume Up";
> + gpios = <&pio 4 1 GPIO_ACTIVE_LOW>; /* PE1 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <KEY_VOLUMEUP>;
> + };
> +
> + button-vol-down {
> + label = "Key Volume Down";
> + gpios = <&pio 4 2 GPIO_ACTIVE_LOW>; /* PE2 */
> + linux,input-type = <EV_KEY>;
> + linux,code = <KEY_VOLUMEDOWN>;
> + };
> + };
> +
> + reg_vcc_sd2: regulator-vcc3v3 {
> + compatible = "regulator-fixed";
> + gpio = <&pio 4 4 GPIO_ACTIVE_HIGH>; /* PE4 */
> + regulator-name = "vcc_3v3_sd2";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + };
> +
> + reg_vcc_usb: regulator-vcc-5v0-usb {
> + compatible = "regulator-fixed";
> + enable-active-high;
> + gpio = <&pio 8 7 GPIO_ACTIVE_HIGH>; /* PI7 */
> + regulator-name = "vcc_5v0_usb";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + vin-supply = <&vcc_3v3_usb>;
> + };
> +
> + vcc_3v3_usb: vcc-3v3-usb {
> + compatible = "regulator-fixed";
> + enable-active-high;
> + gpio = <&pio 4 5 GPIO_ACTIVE_HIGH>; /* PE5 */
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-name = "vcc_3v3_usb";
> + regulator-max-microvolt = <3300000>;
> + regulator-min-microvolt = <3300000>;
> + };
> +
> + reg_vcc5v: regulator-vcc5v { /* USB-C power input */
> + compatible = "regulator-fixed";
> + regulator-name = "vcc-5v";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + };
> +
> + reg_pll_dcx0: regulator-pll-dcx0 {
> + compatible = "regulator-fixed";
> + regulator-always-on;
> + regulator-name = "vcc-pll";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + };
> +};
> +
> +&cpu0 {
> + cpu-supply = <®_dcdc1>;
> +};
> +
> +&mmc0 {
> + vmmc-supply = <®_vcc_sd2>;
> + disable-wp;
> + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
> + bus-width = <4>;
> + status = "okay";
> +};
> +
> +&mmc2 {
> + vmmc-supply = <®_vcc_sd2>;
> + vqmmc-supply = <®_aldo1>;
> + cd-gpios = <&pio 4 22 GPIO_ACTIVE_LOW>; /* PE22 */
> + bus-width = <4>;
> + status = "okay";
> +};
> +
> +&ohci0 {
> + status = "okay";
> +};
> +
> +&ehci0 {
> + status = "okay";
> +};
> +
> +&r_rsb {
> + status = "okay";
> +
> + axp717: pmic@3a3 {
> + compatible = "x-powers,axp717";
> + reg = <0x3a3>;
> + interrupt-controller;
> + #interrupt-cells = <1>;
> + interrupt-parent = <&nmi_intc>;
> + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> + x-powers,drive-vbus-en;
> +
> + vin1-supply = <®_vcc5v>;
> + vin2-supply = <®_vcc5v>;
> + vin3-supply = <®_vcc5v>;
> + vin4-supply = <®_vcc5v>;
> +
> + regulators {
> + reg_dcdc1: dcdc1 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <810000>;
> + regulator-max-microvolt = <1100000>;
> + regulator-name = "vdd-cpu";
> + };
> +
> + reg_dcdc2: dcdc2 {
> + regulator-always-on;
> + regulator-min-microvolt = <940000>;
> + regulator-max-microvolt = <940000>;
> + regulator-name = "vdd-sys";
> + };
> +
> + reg_dcdc3: dcdc3 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <1100000>;
> + regulator-max-microvolt = <1100000>;
> + regulator-name = "vdd-dram";
> + };
> +
> + reg_aldo1: aldo1 {
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-name = "vcc-sd2";
> + };
> +
> + reg_aldo2: aldo2 {
> + /* unused */
> + };
> +
> + reg_aldo3: aldo3 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <3500000>;
> + regulator-name = "axp717-aldo3";
> + };
> +
> + reg_aldo4: aldo4 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <3500000>;
> + regulator-name = "axp717-aldo4";
> + };
> +
> + reg_bldo1: bldo1 {
> + /* unused */
> + };
> +
> + reg_bldo2: bldo2 {
> + regulator-always-on;
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-name = "vcc-pll";
> + };
> +
> + reg_bldo3: bldo3 {
> + /* unused */
> + };
> +
> + reg_bldo4: bldo4 {
> + /* unused */
> + };
> +
> + reg_cldo1: cldo1 {
> + /* unused */
> + };
> +
> + reg_cldo2: cldo2 {
> + /* unused */
> + };
> +
> + reg_cldo3: cldo3 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <3500000>;
> + regulator-name = "axp717-cldo3";
> + };
> +
> + reg_cldo4: cldo4 {
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-name = "vcc-wifi";
> + };
> +
> + reg_boost: boost {
> + regulator-min-microvolt = <5126000>;
> + regulator-max-microvolt = <5126000>;
> + regulator-name = "boost";
> + };
> +
> + reg_cpusldo: cpusldo {
> + /* unused */
> + };
> + };
> + };
> +};
> +
> +&uart0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&uart0_ph_pins>;
> + status = "okay";
> +};
> +
> +&pio {
> + vcc-pg-supply = <®_pll_dcx0>;
> +};
> +
> +/* the AXP717 has USB type-C role switch functionality, to be implemented */
> +&usbotg {
> + dr_mode = "host"; /* USB type-C receptable */
> + status = "okay";
> +};
> +
> +&usbphy {
> + usb0_vbus-supply = <®_vcc_usb>;
> + status = "okay";
> +};
>
next prev parent reply other threads:[~2024-04-21 20:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-20 10:43 [PATCH v2 0/5] arm64: dts: allwinner: Add Anbernic RG35XX (Plus/H/2024) support Ryan Walklin
2024-04-20 10:43 ` [PATCH v2 1/5] dt-bindings: arm: sunxi: document Anbernic RG35XX handheld gaming device variants Ryan Walklin
2024-04-20 10:43 ` [PATCH v2 2/5] arm64: dts: allwinner: h700: Add RG35XX 2024 DTS Ryan Walklin
2024-04-20 10:59 ` Krzysztof Kozlowski
2024-04-21 2:05 ` Ryan Walklin
2024-04-21 0:49 ` Andre Przywara
2024-04-21 2:28 ` Ryan Walklin
2024-04-22 10:17 ` Andre Przywara
2024-04-21 4:00 ` Chris Morgan
2024-04-21 8:43 ` Ryan Walklin
2024-04-22 12:34 ` Andre Przywara
2024-04-22 11:06 ` Andre Przywara
2024-04-21 20:01 ` Jernej Škrabec [this message]
2024-04-20 10:43 ` [PATCH v2 3/5] arm64: dts: allwinner: h700: Add RG35XX-Plus DTS Ryan Walklin
2024-04-21 0:53 ` Andre Przywara
2024-04-21 16:53 ` Chris Morgan
2024-04-20 10:43 ` [PATCH v2 4/5] arm64: dts: allwinner: h700: Add RG35XX-H DTS Ryan Walklin
2024-04-21 1:06 ` Andre Przywara
2024-04-21 3:09 ` Chris Morgan
2024-04-21 8:18 ` Ryan Walklin
2024-04-22 10:17 ` Andre Przywara
2024-04-20 10:43 ` [PATCH v2 5/5] arm64: dts: allwinner: h700: Add RG35XX DTBs to Makefile Ryan Walklin
2024-04-21 1:07 ` Andre Przywara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2320236.ElGaqSPkdT@jernej-laptop \
--to=jernej.skrabec@gmail.com \
--cc=andre.przywara@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=macromorgan@hotmail.com \
--cc=robh@kernel.org \
--cc=ryan@testtoast.com \
--cc=samuel@sholland.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox