Rebase Nanopi patches over existing kernel source (#4665)

* rockchip64: apply nanopi-r2s patches over existing kernel source

* rockchip64: apply nanopi-r4s patch over existing kernel source
This commit is contained in:
Paolo 2023-01-07 20:53:40 +01:00 committed by GitHub
parent b9170c2f22
commit 362e777f11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 872 additions and 666 deletions

View File

@ -19,7 +19,7 @@ index 000000000..bf0a625fe
+
+/dts-v1/;
+#include <dt-bindings/input/linux-event-codes.h>
+#include "rk3328-nanopi-r2-common.dtsi"
+#include "rk3328-nanopi-r2s.dts"
+
+/ {
+ model = "FriendlyElec NanoPi NEO3";

File diff suppressed because it is too large Load Diff

View File

@ -1,50 +1,86 @@
This patch is an adapted version of:
https://github.com/friendlyarm/kernel-rockchip/commit/0e2cbeb4b1e645f5827b54bf50c65577be3eb7b4
From baad3620b42d91baa729b6f5c959657b93e76bda Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Sat, 7 Jan 2023 12:09:38 +0000
Subject: [PATCH] rockchip64: consolidate nanopi-r4s dts patch
Adjusted:
- do not mess with common Nano{Pi,PC}4 device tree (rk3399-nanopi4.dtsi)
- disabled non existent bluetooth node at uart0
- disabled usb_host1
---
.../boot/dts/rockchip/rk3399-nanopi-r4s.dts | 149 ++++++++++--------
1 file changed, 86 insertions(+), 63 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
new file mode 100644
index 000000000000..7b136d4707c8
--- /dev/null
index fe5b5261001..41bd45763d2 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
@@ -0,0 +1,156 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2020 FriendlyElec Computer Tech. Co., Ltd.
+ * (http://www.friendlyarm.com)
+ */
+
+/dts-v1/;
+#include "rk3399-nanopi4.dtsi"
+
+/ {
+ model = "FriendlyElec NanoPi R4S";
@@ -1,15 +1,7 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
- * FriendlyElec NanoPC-T4 board device tree source
- *
* Copyright (c) 2020 FriendlyElec Computer Tech. Co., Ltd.
* (http://www.friendlyarm.com)
- *
- * Copyright (c) 2018 Collabora Ltd.
- *
- * Copyright (c) 2020 Jensen Huang <jensenhuang@friendlyarm.com>
- * Copyright (c) 2020 Marty Jones <mj8263788@gmail.com>
- * Copyright (c) 2021 Tianling Shen <cnsztl@gmail.com>
*/
/dts-v1/;
@@ -17,42 +9,19 @@
/ {
model = "FriendlyElec NanoPi R4S";
- compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399";
+ compatible = "friendlyelec,nanopi-r4s", "rockchip,rk3399";
+
- /delete-node/ display-subsystem;
-
- gpio-leds {
- pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
-
- /delete-node/ led-0;
-
- lan_led: led-lan {
- gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
- label = "green:lan";
- };
-
- sys_led: led-sys {
- gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
- label = "red:power";
- default-state = "on";
- };
-
- wan_led: led-wan {
- gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
- label = "green:wan";
- };
+ aliases {
+ ethernet1 = &r8169;
+ };
+
+ gpio-keys {
};
gpio-keys {
- pinctrl-0 = <&reset_button_pin>;
-
- /delete-node/ key-power;
-
- key-reset {
+ button@1 {
+ debounce-interval = <50>;
+ gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
debounce-interval = <50>;
gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
- label = "reset";
- linux,code = <KEY_RESTART>;
+ label = "K1";
+ linux,code = <BTN_1>;
+ wakeup-source;
+ };
+ };
+
+ vdd_5v: vdd-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd_5v";
+ regulator-always-on;
+ regulator-boot-on;
+ };
};
};
@@ -62,44 +31,75 @@ vdd_5v: vdd-5v {
regulator-always-on;
regulator-boot-on;
};
+
+ vcc5v0_usb1: vcc5v0-usb1 {
+ compatible = "regulator-fixed";
@ -61,16 +97,21 @@ index 000000000000..7b136d4707c8
+ regulator-boot-on;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&emmc_phy {
+ status = "disabled";
+};
+
};
&emmc_phy {
status = "disabled";
};
-&i2c4 {
+&fusb0 {
+ status = "disabled";
+};
+
status = "disabled";
};
-&pcie0 {
- max-link-speed = <1>;
- num-lanes = <1>;
- vpcie3v3-supply = <&vcc3v3_sys>;
+&leds {
+ lan_led: led-2 {
+ gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
@ -81,70 +122,84 @@ index 000000000000..7b136d4707c8
+ gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
+ label = "wan_led";
+ };
+};
+
+&pinctrl {
};
&pinctrl {
- gpio-leds {
- /delete-node/ status-led-pin;
+ key_pins {
+ rockchip,pins =
+ <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
- lan_led_pin: lan-led-pin {
- rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
- };
+ network_leds_pins {
+ rockchip,pins =
+ <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>,
+ <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+};
+
- sys_led_pin: sys-led-pin {
- rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
- };
+/*&mach {
+ hwrev = <0x09>;
+ model = "NanoPi R4S";
+};*/
+
- wan_led_pin: wan-led-pin {
- rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
+&pcie0 {
+ max-link-speed = <1>;
+ num-lanes = <1>;
+ vpcie3v3-supply = <&vcc3v3_sys>;
+
- rockchip-key {
- /delete-node/ power-key;
+ pcie@0 {
+ reg = <0x00000000 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+
- reset_button_pin: reset-button-pin {
- rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
+ r8169: pcie@0,0 {
+ reg = <0x000000 0 0 0 0>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ };
+ };
+};
+
+&sdhci {
+ status = "disabled";
+};
+
+&sdio0 {
+ status = "disabled";
+};
+
};
};
};
@@ -112,6 +112,10 @@ &sdio0 {
status = "disabled";
};
+&sdmmc {
+ host-index-min = <1>;
+};
+
+&u2phy0_host {
+ phy-supply = <&vdd_5v>;
+};
+
+&u2phy1_host {
+ status = "disabled";
+};
+
+&usbdrd_dwc3_0 {
+ dr_mode = "host";
+};
+
+&vcc3v3_sys {
+ vin-supply = <&vcc5v0_sys>;
+};
&u2phy0_host {
phy-supply = <&vdd_5v>;
};
@@ -120,10 +124,6 @@ &u2phy1_host {
status = "disabled";
};
-&uart0 {
- status = "disabled";
-};
-
&usbdrd_dwc3_0 {
dr_mode = "host";
};
@@ -131,3 +131,26 @@ &usbdrd_dwc3_0 {
&vcc3v3_sys {
vin-supply = <&vcc5v0_sys>;
};
+
+// Armbian tweaks
+&lan_led {
@ -168,3 +223,6 @@ index 000000000000..7b136d4707c8
+&usb_host1_ohci {
+ status = "disabled";
+};
--
2.34.1