From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68F9E145341 for ; Thu, 6 Jun 2024 09:52:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717667527; cv=none; b=P5WJ8UiPHjMohZiD+Q2yejqyOxyj4+Ida8+3IOT1GKyfPG8F+YkRYe9LNEL0Z1XCiYsyrzEWmtPPwgf8ylXiZ8Z+q9uDuHUfz2WMuV1wIxCiCwbIwjUuQk8h8olVsyNYQlfFOwLdanWWk6bTo9PVS8Fvc2in3lHIxI5mmXgSFuE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717667527; c=relaxed/simple; bh=BMVsvadeSJYc5SZSqkkbWxIllVOv6IflrLGiRhdMHds=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IR+OMHB59BXY11/ZBzVnTONDVsFcOUOdvduUSRas4QfXDOil4o/5H6y6+uoe5LNtz4DBjvFIjjO3Oobzuz3xqgebm8fz1rxCdGohfrGGAWySdkG4qNkxTzTP7SfSjKYz3v9If8+WKm9wMYi55mNyoCxvC4tNgexfdqdiByikUyM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 48DE4339; Thu, 6 Jun 2024 02:52:29 -0700 (PDT) Received: from donnerap.manchester.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4F2043F64C; Thu, 6 Jun 2024 02:52:03 -0700 (PDT) Date: Thu, 6 Jun 2024 10:51:59 +0100 From: Andre Przywara To: Chris Morgan Cc: linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, mripard@kernel.org, ryan@testtoast.com, samuel@sholland.org, jernej.skrabec@gmail.com, wens@csie.org, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, Chris Morgan Subject: Re: [PATCH 2/2] arm64: dts: allwinner: h700: Add Anbernic RG35XX-SP Message-ID: <20240606105159.33a2b917@donnerap.manchester.arm.com> In-Reply-To: <20240605185339.266833-3-macroalpha82@gmail.com> References: <20240605185339.266833-1-macroalpha82@gmail.com> <20240605185339.266833-3-macroalpha82@gmail.com> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 5 Jun 2024 13:53:39 -0500 Chris Morgan wrote: > From: Chris Morgan > > The Anbernic RG35XXSP is almost identical to the RG35XX-Plus, but in a > clamshell form-factor. The key differences between the SP and the Plus > is a lid switch and an RTC on the same i2c bus as the PMIC. > > Signed-off-by: Chris Morgan > --- > arch/arm64/boot/dts/allwinner/Makefile | 3 +- > .../sun50i-h700-anbernic-rg35xx-sp.dts | 145 ++++++++++++++++++ > 2 files changed, 147 insertions(+), 1 deletion(-) > create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-sp.dts > > diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile > index 0db7b60b49a1..00bed412ee31 100644 > --- a/arch/arm64/boot/dts/allwinner/Makefile > +++ b/arch/arm64/boot/dts/allwinner/Makefile > @@ -49,5 +49,6 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w.dtb > dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb > dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-transpeed-8k618-t.dtb > dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h700-anbernic-rg35xx-2024.dtb > -dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h700-anbernic-rg35xx-plus.dtb > dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h700-anbernic-rg35xx-h.dtb > +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h700-anbernic-rg35xx-plus.dtb > +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h700-anbernic-rg35xx-sp.dtb > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-sp.dts b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-sp.dts > new file mode 100644 > index 000000000000..a1d16b65ef5d > --- /dev/null > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-sp.dts > @@ -0,0 +1,145 @@ > +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +/* > + * Copyright (C) 2024 Ryan Walklin . > + * Copyright (C) 2024 Chris Morgan . > + */ > + > +#include > +#include "sun50i-h700-anbernic-rg35xx-plus.dts" > + > +/ { > + model = "Anbernic RG35XX SP"; > + compatible = "anbernic,rg35xx-sp", "allwinner,sun50i-h700"; > + > + gpio-keys-lid { > + compatible = "gpio-keys"; > + > + lid-switch { > + label = "Lid Switch"; > + gpios = <&pio 4 7 GPIO_ACTIVE_LOW>; /* PE7 */ > + linux,can-disable; > + linux,code = ; > + linux,input-type = ; > + wakeup-event-action = ; > + wakeup-source; > + }; > + }; > +}; > + > +/delete-node/ &r_rsb; I don't think deleting the *RSB* node is right here, if at all, I'd expect status="disabled", and then maybe deleting the axp717 node within? Or maybe factor the AXP node out into a separate file, and include it from the -2024.dts and from this one? Or move every board to I2C? What do people think about this? Cheers, Andre > + > +&r_i2c { > + pinctrl-0 = <&r_i2c_pins>; > + pinctrl-names = "default"; > + status = "okay"; > + > + axp717: pmic@34 { > + compatible = "x-powers,axp717"; > + reg = <0x34>; > + interrupt-controller; > + #interrupt-cells = <1>; > + interrupt-parent = <&nmi_intc>; > + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; > + > + vin1-supply = <®_vcc5v>; > + vin2-supply = <®_vcc5v>; > + vin3-supply = <®_vcc5v>; > + vin4-supply = <®_vcc5v>; > + > + regulators { > + reg_dcdc1: dcdc1 { > + regulator-always-on; > + regulator-min-microvolt = <900000>; > + 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-gpu-sys"; > + }; > + > + reg_dcdc3: dcdc3 { > + regulator-always-on; > + regulator-min-microvolt = <1100000>; > + regulator-max-microvolt = <1100000>; > + regulator-name = "vdd-dram"; > + }; > + > + reg_aldo1: aldo1 { > + /* 1.8v - unused */ > + }; > + > + reg_aldo2: aldo2 { > + /* 1.8v - unused */ > + }; > + > + reg_aldo3: aldo3 { > + /* 1.8v - unused */ > + }; > + > + reg_aldo4: aldo4 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-name = "vcc-pg"; > + }; > + > + reg_bldo1: bldo1 { > + /* 1.8v - unused */ > + }; > + > + reg_bldo2: bldo2 { > + regulator-always-on; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-name = "vcc-pll"; > + }; > + > + reg_bldo3: bldo3 { > + /* 2.8v - unused */ > + }; > + > + reg_bldo4: bldo4 { > + /* 1.2v - unused */ > + }; > + > + reg_cldo1: cldo1 { > + /* 3.3v - audio codec - not yet implemented */ > + }; > + > + reg_cldo2: cldo2 { > + /* 3.3v - unused */ > + }; > + > + reg_cldo3: cldo3 { > + regulator-always-on; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-name = "vcc-io"; > + }; > + > + reg_cldo4: cldo4 { > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-name = "vcc-wifi"; > + }; > + > + reg_boost: boost { > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5200000>; > + regulator-name = "boost"; > + }; > + > + reg_cpusldo: cpusldo { > + /* unused */ > + }; > + }; > + }; > + > + rtc_ext: rtc@51 { > + compatible = "nxp,pcf8563"; > + reg = <0x51>; > + }; > +};