From f6f0b76bcfcb1163e304c262207aeb714d16307b Mon Sep 17 00:00:00 2001 From: Gunjan Gupta Date: Mon, 26 Jun 2023 13:29:46 +0000 Subject: [PATCH 1/2] ARM: dts: sun8i: nanopiduo2: Use key-0 as power button The onboard button key-0 was not marked as power button. This meant that once the board was suspended, there was no way to bring it back to life. Mark key-0 as power button so that it can be used to bring the board back to life --- arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts index 343b02b97..4878d27ba 100644 --- a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts @@ -42,8 +42,9 @@ gpio-keys { key-0 { label = "k1"; - linux,code = ; + linux,code = ; gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; /* PL3 */ + wakeup-source; }; }; -- 2.34.1 From 51af316406c82571be4a30665fbf93cab9caf080 Mon Sep 17 00:00:00 2001 From: Gunjan Gupta Date: Mon, 26 Jun 2023 13:53:14 +0000 Subject: [PATCH 2/2] ARM: dts: sun8i: nanopiduo2: enable ethernet NanoPi Duo2 has pinout for ethernet. Lets enable the same in dts --- arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts index 4878d27ba..8669fd087 100644 --- a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts @@ -105,6 +105,13 @@ &ehci0 { status = "okay"; }; +&emac { + phy-handle = <&int_mii_phy>; + phy-mode = "mii"; + allwinner,leds-active-low; + status = "okay"; +}; + &mmc0 { bus-width = <4>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ -- 2.34.1