devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/4] Add Anbernic RG35XX-SP
@ 2024-07-02 19:34 Chris Morgan
  2024-07-02 19:34 ` [PATCH V2 1/4] dt-bindings: arm: sunxi: Add Anbernic RG35XXSP Chris Morgan
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Chris Morgan @ 2024-07-02 19:34 UTC (permalink / raw)
  To: linux-sunxi
  Cc: devicetree, mripard, ryan, andre.przywara, samuel, jernej.skrabec,
	wens, conor+dt, krzk+dt, robh, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add support for the Anbernic RG35XX-SP handheld gaming device. The
Anbernic RG35XX-SP is a clamshell device, but hardware wise is very
similar to the RG35XX-Plus. The RG35XX-SP has a lid-switch and an
external RTC that necessitate a distinct device tree.

Changes from V1:
 - Switched all RG35XX devices from the r_rsb bus to the r_i2c bus for
   the PMIC to keep it consistent.
 - Added missing pinctrl nodes in sun50i-h616.dtsi file for the r_i2c
   bus.
 - Modified devicetree documentation to keep definition of the RG35XX
   series consistent with other Allwinner devices.

Chris Morgan (4):
  dt-bindings: arm: sunxi: Add Anbernic RG35XXSP
  arm64: dts: allwinner: h616: Add r_i2c pinctrl nodes
  arm64: dts: allwinner: h616: Change RG35XX Series from r_rsb to r_i2c
  arm64: dts: allwinner: h700: Add Anbernic RG35XX-SP

 .../devicetree/bindings/arm/sunxi.yaml        |  9 +++--
 arch/arm64/boot/dts/allwinner/Makefile        |  3 +-
 .../arm64/boot/dts/allwinner/sun50i-h616.dtsi |  2 ++
 .../sun50i-h700-anbernic-rg35xx-2024.dts      |  6 ++--
 .../sun50i-h700-anbernic-rg35xx-sp.dts        | 34 +++++++++++++++++++
 5 files changed, 48 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-sp.dts

-- 
2.34.1


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

* [PATCH V2 1/4] dt-bindings: arm: sunxi: Add Anbernic RG35XXSP
  2024-07-02 19:34 [PATCH V2 0/4] Add Anbernic RG35XX-SP Chris Morgan
@ 2024-07-02 19:34 ` Chris Morgan
  2024-07-03  5:11   ` Krzysztof Kozlowski
  2024-07-02 19:34 ` [PATCH V2 2/4] arm64: dts: allwinner: h616: Add r_i2c pinctrl nodes Chris Morgan
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Chris Morgan @ 2024-07-02 19:34 UTC (permalink / raw)
  To: linux-sunxi
  Cc: devicetree, mripard, ryan, andre.przywara, samuel, jernej.skrabec,
	wens, conor+dt, krzk+dt, robh, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add the Anbernic RG35XXSP variant device and consolidate the Anbernic
H700 devices.

The Anbernic RG35XXSP is almost identical to the RG35XX-Plus, but in a
clamshell form-factor with an external RTC and a lid switch.

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

diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
index c2a158b75e49..60b11b289535 100644
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
@@ -61,14 +61,19 @@ properties:
           - const: anbernic,rg35xx-2024
           - const: allwinner,sun50i-h700
 
+      - description: Anbernic RG35XX H
+        items:
+          - const: anbernic,rg35xx-h
+          - const: allwinner,sun50i-h700
+
       - description: Anbernic RG35XX Plus
         items:
           - const: anbernic,rg35xx-plus
           - const: allwinner,sun50i-h700
 
-      - description: Anbernic RG35XX H
+      - description: Anbernic RG35XX SP
         items:
-          - const: anbernic,rg35xx-h
+          - const: anbernic,rg35xx-sp
           - const: allwinner,sun50i-h700
 
       - description: Amarula A64 Relic
-- 
2.34.1


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

* [PATCH V2 2/4] arm64: dts: allwinner: h616: Add r_i2c pinctrl nodes
  2024-07-02 19:34 [PATCH V2 0/4] Add Anbernic RG35XX-SP Chris Morgan
  2024-07-02 19:34 ` [PATCH V2 1/4] dt-bindings: arm: sunxi: Add Anbernic RG35XXSP Chris Morgan
@ 2024-07-02 19:34 ` Chris Morgan
  2024-07-03 13:14   ` Andre Przywara
  2024-07-02 19:34 ` [PATCH V2 3/4] arm64: dts: allwinner: h616: Change RG35XX Series from r_rsb to r_i2c Chris Morgan
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Chris Morgan @ 2024-07-02 19:34 UTC (permalink / raw)
  To: linux-sunxi
  Cc: devicetree, mripard, ryan, andre.przywara, samuel, jernej.skrabec,
	wens, conor+dt, krzk+dt, robh, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add pinctrl nodes for the r_i2c node. Without the pinmux defined the
r_i2c bus may fail to work, possibly if the bootloader uses rsb mode
for the PMIC.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
index 921d5f61d8d6..e31945c3895e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
@@ -837,6 +837,8 @@ r_i2c: i2c@7081400 {
 			dmas = <&dma 48>, <&dma 48>;
 			dma-names = "rx", "tx";
 			resets = <&r_ccu RST_R_APB2_I2C>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&r_i2c_pins>;
 			status = "disabled";
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.34.1


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

* [PATCH V2 3/4] arm64: dts: allwinner: h616: Change RG35XX Series from r_rsb to r_i2c
  2024-07-02 19:34 [PATCH V2 0/4] Add Anbernic RG35XX-SP Chris Morgan
  2024-07-02 19:34 ` [PATCH V2 1/4] dt-bindings: arm: sunxi: Add Anbernic RG35XXSP Chris Morgan
  2024-07-02 19:34 ` [PATCH V2 2/4] arm64: dts: allwinner: h616: Add r_i2c pinctrl nodes Chris Morgan
@ 2024-07-02 19:34 ` Chris Morgan
  2024-07-02 19:34 ` [PATCH V2 4/4] arm64: dts: allwinner: h700: Add Anbernic RG35XX-SP Chris Morgan
  2024-07-03 14:27 ` [PATCH V2 0/4] " Rob Herring (Arm)
  4 siblings, 0 replies; 10+ messages in thread
From: Chris Morgan @ 2024-07-02 19:34 UTC (permalink / raw)
  To: linux-sunxi
  Cc: devicetree, mripard, ryan, andre.przywara, samuel, jernej.skrabec,
	wens, conor+dt, krzk+dt, robh, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Change the Anbernic RG35XX series to use the r_i2c bus for the PMIC
instead of the r_rsb bus. This is to keep the device tree consistent
as there are at least 2 devices (the RG35XX-SP and RG28XX) that have
an external RTC on the r_i2c bus.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 .../boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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
index ee30584b6ad7..e2bbd22bd80a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
@@ -201,12 +201,12 @@ &pio {
 	vcc-pi-supply = <&reg_cldo3>;
 };
 
-&r_rsb {
+&r_i2c {
 	status = "okay";
 
-	axp717: pmic@3a3 {
+	axp717: pmic@34 {
 		compatible = "x-powers,axp717";
-		reg = <0x3a3>;
+		reg = <0x34>;
 		interrupt-controller;
 		#interrupt-cells = <1>;
 		interrupt-parent = <&nmi_intc>;
-- 
2.34.1


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

* [PATCH V2 4/4] arm64: dts: allwinner: h700: Add Anbernic RG35XX-SP
  2024-07-02 19:34 [PATCH V2 0/4] Add Anbernic RG35XX-SP Chris Morgan
                   ` (2 preceding siblings ...)
  2024-07-02 19:34 ` [PATCH V2 3/4] arm64: dts: allwinner: h616: Change RG35XX Series from r_rsb to r_i2c Chris Morgan
@ 2024-07-02 19:34 ` Chris Morgan
  2024-07-03 14:27 ` [PATCH V2 0/4] " Rob Herring (Arm)
  4 siblings, 0 replies; 10+ messages in thread
From: Chris Morgan @ 2024-07-02 19:34 UTC (permalink / raw)
  To: linux-sunxi
  Cc: devicetree, mripard, ryan, andre.przywara, samuel, jernej.skrabec,
	wens, conor+dt, krzk+dt, robh, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

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 <macromorgan@hotmail.com>
---
 arch/arm64/boot/dts/allwinner/Makefile        |  3 +-
 .../sun50i-h700-anbernic-rg35xx-sp.dts        | 34 +++++++++++++++++++
 2 files changed, 36 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..0cf16dc903cd
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-sp.dts
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/*
+ * Copyright (C) 2024 Ryan Walklin <ryan@testtoast.com>.
+ * Copyright (C) 2024 Chris Morgan <macroalpha82@gmail.com>.
+ */
+
+#include <dt-bindings/input/gpio-keys.h>
+#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 = <SW_LID>;
+			linux,input-type = <EV_SW>;
+			wakeup-event-action = <EV_ACT_DEASSERTED>;
+			wakeup-source;
+		};
+	};
+};
+
+&r_i2c {
+	rtc_ext: rtc@51 {
+		compatible = "nxp,pcf8563";
+		reg = <0x51>;
+	};
+};
-- 
2.34.1


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

* Re: [PATCH V2 1/4] dt-bindings: arm: sunxi: Add Anbernic RG35XXSP
  2024-07-02 19:34 ` [PATCH V2 1/4] dt-bindings: arm: sunxi: Add Anbernic RG35XXSP Chris Morgan
@ 2024-07-03  5:11   ` Krzysztof Kozlowski
  2024-07-05 16:48     ` Chris Morgan
  0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-03  5:11 UTC (permalink / raw)
  To: Chris Morgan, linux-sunxi
  Cc: devicetree, mripard, ryan, andre.przywara, samuel, jernej.skrabec,
	wens, conor+dt, krzk+dt, robh, Chris Morgan

On 02/07/2024 21:34, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add the Anbernic RG35XXSP variant device and consolidate the Anbernic
> H700 devices.
> 
> The Anbernic RG35XXSP is almost identical to the RG35XX-Plus, but in a
> clamshell form-factor with an external RTC and a lid switch.
> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> ---
>  Documentation/devicetree/bindings/arm/sunxi.yaml | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
> index c2a158b75e49..60b11b289535 100644
> --- a/Documentation/devicetree/bindings/arm/sunxi.yaml
> +++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
> @@ -61,14 +61,19 @@ properties:
>            - const: anbernic,rg35xx-2024
>            - const: allwinner,sun50i-h700
>  
> +      - description: Anbernic RG35XX H
> +        items:
> +          - const: anbernic,rg35xx-h
> +          - const: allwinner,sun50i-h700
> +
>        - description: Anbernic RG35XX Plus
>          items:
>            - const: anbernic,rg35xx-plus
>            - const: allwinner,sun50i-h700
>  
> -      - description: Anbernic RG35XX H
> +      - description: Anbernic RG35XX SP
>          items:
> -          - const: anbernic,rg35xx-h
> +          - const: anbernic,rg35xx-sp

Where is the consolidation? All this is supposed to be in an enum...



Best regards,
Krzysztof


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

* Re: [PATCH V2 2/4] arm64: dts: allwinner: h616: Add r_i2c pinctrl nodes
  2024-07-02 19:34 ` [PATCH V2 2/4] arm64: dts: allwinner: h616: Add r_i2c pinctrl nodes Chris Morgan
@ 2024-07-03 13:14   ` Andre Przywara
  2024-07-03 23:39     ` Andre Przywara
  0 siblings, 1 reply; 10+ messages in thread
From: Andre Przywara @ 2024-07-03 13:14 UTC (permalink / raw)
  To: Chris Morgan
  Cc: linux-sunxi, devicetree, mripard, ryan, samuel, jernej.skrabec,
	wens, conor+dt, krzk+dt, robh, Chris Morgan

On Tue,  2 Jul 2024 14:34:12 -0500
Chris Morgan <macroalpha82@gmail.com> wrote:

> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add pinctrl nodes for the r_i2c node. Without the pinmux defined the
> r_i2c bus may fail to work, possibly if the bootloader uses rsb mode
> for the PMIC.

Yes, those are the only pins available, checked against the manual.

> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
>  arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> index 921d5f61d8d6..e31945c3895e 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> @@ -837,6 +837,8 @@ r_i2c: i2c@7081400 {
>  			dmas = <&dma 48>, <&dma 48>;
>  			dma-names = "rx", "tx";
>  			resets = <&r_ccu RST_R_APB2_I2C>;
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&r_i2c_pins>;
>  			status = "disabled";
>  			#address-cells = <1>;
>  			#size-cells = <0>;


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

* Re: [PATCH V2 0/4] Add Anbernic RG35XX-SP
  2024-07-02 19:34 [PATCH V2 0/4] Add Anbernic RG35XX-SP Chris Morgan
                   ` (3 preceding siblings ...)
  2024-07-02 19:34 ` [PATCH V2 4/4] arm64: dts: allwinner: h700: Add Anbernic RG35XX-SP Chris Morgan
@ 2024-07-03 14:27 ` Rob Herring (Arm)
  4 siblings, 0 replies; 10+ messages in thread
From: Rob Herring (Arm) @ 2024-07-03 14:27 UTC (permalink / raw)
  To: Chris Morgan
  Cc: samuel, conor+dt, krzk+dt, Chris Morgan, devicetree, linux-sunxi,
	jernej.skrabec, mripard, andre.przywara, ryan, wens


On Tue, 02 Jul 2024 14:34:10 -0500, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add support for the Anbernic RG35XX-SP handheld gaming device. The
> Anbernic RG35XX-SP is a clamshell device, but hardware wise is very
> similar to the RG35XX-Plus. The RG35XX-SP has a lid-switch and an
> external RTC that necessitate a distinct device tree.
> 
> Changes from V1:
>  - Switched all RG35XX devices from the r_rsb bus to the r_i2c bus for
>    the PMIC to keep it consistent.
>  - Added missing pinctrl nodes in sun50i-h616.dtsi file for the r_i2c
>    bus.
>  - Modified devicetree documentation to keep definition of the RG35XX
>    series consistent with other Allwinner devices.
> 
> Chris Morgan (4):
>   dt-bindings: arm: sunxi: Add Anbernic RG35XXSP
>   arm64: dts: allwinner: h616: Add r_i2c pinctrl nodes
>   arm64: dts: allwinner: h616: Change RG35XX Series from r_rsb to r_i2c
>   arm64: dts: allwinner: h700: Add Anbernic RG35XX-SP
> 
>  .../devicetree/bindings/arm/sunxi.yaml        |  9 +++--
>  arch/arm64/boot/dts/allwinner/Makefile        |  3 +-
>  .../arm64/boot/dts/allwinner/sun50i-h616.dtsi |  2 ++
>  .../sun50i-h700-anbernic-rg35xx-2024.dts      |  6 ++--
>  .../sun50i-h700-anbernic-rg35xx-sp.dts        | 34 +++++++++++++++++++
>  5 files changed, 48 insertions(+), 6 deletions(-)
>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-sp.dts
> 
> --
> 2.34.1
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y allwinner/sun50i-h700-anbernic-rg35xx-2024.dtb allwinner/sun50i-h700-anbernic-rg35xx-sp.dtb' for 20240702193414.57461-1-macroalpha82@gmail.com:

arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-sp.dtb: pmic@34: regulators: 'boost' does not match any of the regexes: '^(([a-f])?ldo[0-9]|dcdc[0-7a-e]|ldo(_|-)io(0|1)|(dc1)?sw|rtc(_|-)ldo|cpusldo|drivevbus|dc5ldo)$', 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/mfd/x-powers,axp152.yaml#
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dtb: pmic@34: regulators: 'boost' does not match any of the regexes: '^(([a-f])?ldo[0-9]|dcdc[0-7a-e]|ldo(_|-)io(0|1)|(dc1)?sw|rtc(_|-)ldo|cpusldo|drivevbus|dc5ldo)$', 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/mfd/x-powers,axp152.yaml#






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

* Re: [PATCH V2 2/4] arm64: dts: allwinner: h616: Add r_i2c pinctrl nodes
  2024-07-03 13:14   ` Andre Przywara
@ 2024-07-03 23:39     ` Andre Przywara
  0 siblings, 0 replies; 10+ messages in thread
From: Andre Przywara @ 2024-07-03 23:39 UTC (permalink / raw)
  To: samuel, jernej.skrabec, wens
  Cc: Chris Morgan, linux-sunxi, devicetree, mripard, ryan, conor+dt,
	krzk+dt, robh, Chris Morgan

On Wed, 3 Jul 2024 14:14:39 +0100
Andre Przywara <andre.przywara@arm.com> wrote:

> On Tue,  2 Jul 2024 14:34:12 -0500
> Chris Morgan <macroalpha82@gmail.com> wrote:
> 
> > From: Chris Morgan <macromorgan@hotmail.com>
> > 
> > Add pinctrl nodes for the r_i2c node. Without the pinmux defined the
> > r_i2c bus may fail to work, possibly if the bootloader uses rsb mode
> > for the PMIC.  
> 
> Yes, those are the only pins available, checked against the manual.

Looking closer, this is actually a proper bug: none of the five H616
devices using R_I2C set the pinmux (not even in the board .dts files),
so nothing sets this up in the kernel. We are just lucky that U-Boot's
SPL programs the pinmux, and nothing changes it afterwards.
So this should be taken as a fix ASAP, potentially with:

Fixes: 0d17c8651188 ("arm64: dts: allwinner: Add Allwinner H616 .dtsi file")

(though I am a bit doubtful about the useful of DT backports in general)

Cheers,
Andre


> 
> > Signed-off-by: Chris Morgan <macromorgan@hotmail.com>  
> 
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
> 
> Cheers,
> Andre
> 
> > ---
> >  arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> > index 921d5f61d8d6..e31945c3895e 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> > @@ -837,6 +837,8 @@ r_i2c: i2c@7081400 {
> >  			dmas = <&dma 48>, <&dma 48>;
> >  			dma-names = "rx", "tx";
> >  			resets = <&r_ccu RST_R_APB2_I2C>;
> > +			pinctrl-names = "default";
> > +			pinctrl-0 = <&r_i2c_pins>;
> >  			status = "disabled";
> >  			#address-cells = <1>;
> >  			#size-cells = <0>;  
> 
> 


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

* Re: [PATCH V2 1/4] dt-bindings: arm: sunxi: Add Anbernic RG35XXSP
  2024-07-03  5:11   ` Krzysztof Kozlowski
@ 2024-07-05 16:48     ` Chris Morgan
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Morgan @ 2024-07-05 16:48 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Chris Morgan, linux-sunxi, devicetree, mripard, ryan,
	andre.przywara, samuel, jernej.skrabec, wens, conor+dt, krzk+dt,
	robh

On Wed, Jul 03, 2024 at 07:11:10AM +0200, Krzysztof Kozlowski wrote:
> On 02/07/2024 21:34, Chris Morgan wrote:
> > From: Chris Morgan <macromorgan@hotmail.com>
> > 
> > Add the Anbernic RG35XXSP variant device and consolidate the Anbernic
> > H700 devices.
> > 
> > The Anbernic RG35XXSP is almost identical to the RG35XX-Plus, but in a
> > clamshell form-factor with an external RTC and a lid switch.
> > 
> > Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> > ---
> >  Documentation/devicetree/bindings/arm/sunxi.yaml | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
> > index c2a158b75e49..60b11b289535 100644
> > --- a/Documentation/devicetree/bindings/arm/sunxi.yaml
> > +++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
> > @@ -61,14 +61,19 @@ properties:
> >            - const: anbernic,rg35xx-2024
> >            - const: allwinner,sun50i-h700
> >  
> > +      - description: Anbernic RG35XX H
> > +        items:
> > +          - const: anbernic,rg35xx-h
> > +          - const: allwinner,sun50i-h700
> > +
> >        - description: Anbernic RG35XX Plus
> >          items:
> >            - const: anbernic,rg35xx-plus
> >            - const: allwinner,sun50i-h700
> >  
> > -      - description: Anbernic RG35XX H
> > +      - description: Anbernic RG35XX SP
> >          items:
> > -          - const: anbernic,rg35xx-h
> > +          - const: anbernic,rg35xx-sp
> 
> Where is the consolidation? All this is supposed to be in an enum...
> 

I didn't properly edit the notes when I posted the v2 sadly. I forgot
to remove the text about consolidating the devices, since that's how
the rest of the Allwinner devices are done today. I'll resubmit once
I have a few more views on the other patches in this series.

Thank you,
Chris

> 
> 
> Best regards,
> Krzysztof
> 

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

end of thread, other threads:[~2024-07-05 16:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-02 19:34 [PATCH V2 0/4] Add Anbernic RG35XX-SP Chris Morgan
2024-07-02 19:34 ` [PATCH V2 1/4] dt-bindings: arm: sunxi: Add Anbernic RG35XXSP Chris Morgan
2024-07-03  5:11   ` Krzysztof Kozlowski
2024-07-05 16:48     ` Chris Morgan
2024-07-02 19:34 ` [PATCH V2 2/4] arm64: dts: allwinner: h616: Add r_i2c pinctrl nodes Chris Morgan
2024-07-03 13:14   ` Andre Przywara
2024-07-03 23:39     ` Andre Przywara
2024-07-02 19:34 ` [PATCH V2 3/4] arm64: dts: allwinner: h616: Change RG35XX Series from r_rsb to r_i2c Chris Morgan
2024-07-02 19:34 ` [PATCH V2 4/4] arm64: dts: allwinner: h700: Add Anbernic RG35XX-SP Chris Morgan
2024-07-03 14:27 ` [PATCH V2 0/4] " Rob Herring (Arm)

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).