Skip to contentSkip to conversation

arm64: dts: rockchip: Add support for Khadas Edge/Edge-V/Captain boards

PATCH Superseded [email protected] 2 participants 9 messages May 28, 2019 – Jun 14, 2019

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: rockchip: Add support for Khadas Edge/Edge-V/Captain boards

From: Nick <[email protected]>

Add devicetree support for Khadas Edge/Edge-V/Captain boards. Khadas Edge is an expandable Rockchip RK3399 board with goldfinger. Khadas Captain is the carrier board for Khadas Edge. Khadas Edge-V is a Khadas VIM form factor Rockchip RK3399 board.

---
 arch/arm64/boot/dts/rockchip/Makefile              |   3 +
 .../boot/dts/rockchip/rk3399-khadas-captain.dts    |  27 +
 .../boot/dts/rockchip/rk3399-khadas-edge-v.dts     |  28 +
 .../arm64/boot/dts/rockchip/rk3399-khadas-edge.dts |  17 +
 .../boot/dts/rockchip/rk3399-khadas-edge.dtsi      | 795 +++++++++++++++++++++
 5 files changed, 870 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-khadas-captain.dts
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
arch/arm64/boot/dts/rockchip/Makefile +3 -0
index 5f2687a..28e5829 100644
@@ -16,6 +16,9 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-bob.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-inx.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-kd.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-captain.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge-v.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopc-t4.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-m4.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-neo4.dtb
arch/arm64/boot/dts/rockchip/rk3399-khadas-captain.dts new file +27 -0
new file mode 100644
index 0000000..85eb51c
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
+ * (https://www.khadas.com)
+ */
+
+/dts-v1/;
+#include "rk3399-khadas-edge.dtsi"
+
+/ {
+	model = "Khadas Captain";
+	compatible = "khadas,captain", "rockchip,rk3399";
+};
+
+&gmac {
+	status = "okay";
+};
+
+&pcie_phy {
+	status = "okay";
+};
+
+&pcie0 {
+	ep-gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
+	num-lanes = <4>;
+	status = "okay";
+};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts new file +28 -0
new file mode 100644
index 0000000..396b7f4
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
+ * (https://www.khadas.com)
+ */
+
+/dts-v1/;
+#include "rk3399-khadas-edge.dtsi"
+
+/ {
+	model = "Khadas Edge-V";
+	compatible = "khadas,edge-v", "rockchip,rk3399";
+};
+
+&gmac {
+	status = "okay";
+};
+
+&pcie_phy {
+	status = "okay";
+};
+
+&pcie0 {
+	ep-gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
+	num-lanes = <4>;
+	status = "okay";
+};
+
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts new file +17 -0
new file mode 100644
index 0000000..f0d5bae
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
+ * (https://www.khadas.com)
+ */
+
+/dts-v1/;
+#include "rk3399-khadas-edge.dtsi"
+
+/ {
+	model = "Khadas Edge";
+	compatible = "khadas,edge", "rockchip,rk3399";
+};
+
+&gmac {
+	status = "disabled";
+};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +795 -0

795 lines not on this page · raw message

Signature · 1 line
2.7.4
maintainer
#1 lore raw

Hi Nick,

devicetrees look mostly good, with a bit of "bookkeeping" issues and some small nits below.

Am Dienstag, 28. Mai 2019, 11:21:07 CEST schrieb [email protected]:

Quoted 1 line

From: Nick <[email protected]>

Can you provide a full name (first-+surename) for patch from and Signed-off lines please?

Quoted 10 lines

Add devicetree support for Khadas Edge/Edge-V/Captain boards. Khadas Edge is an expandable Rockchip RK3399 board with goldfinger. Khadas Captain is the carrier board for Khadas Edge. Khadas Edge-V is a Khadas VIM form factor Rockchip RK3399 board.

---
 arch/arm64/boot/dts/rockchip/Makefile              |   3 +
 .../boot/dts/rockchip/rk3399-khadas-captain.dts    |  27 +
 .../boot/dts/rockchip/rk3399-khadas-edge-v.dts     |  28 +

when adding boards, please also make sure to add entries to
Documentation/devicetree/bindings/arm/rockchip.yaml

Take a look at the "FriendlyElec NanoPi4 series boards" for an example on how to add a family of boards like your Edge/Captain.

Quoted 57 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-captain.dts new file +27 -0
new file mode 100644
index 0000000..85eb51c
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
+ * (https://www.khadas.com)
+ */
+
+/dts-v1/;
+#include "rk3399-khadas-edge.dtsi"
+
+/ {
+	model = "Khadas Captain";
+	compatible = "khadas,captain", "rockchip,rk3399";
+};
+
+&gmac {
+	status = "okay";
+};
+
+&pcie_phy {
+	status = "okay";
+};
+
+&pcie0 {
+	ep-gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
+	num-lanes = <4>;
+	status = "okay";
+};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts new file +18 -0
new file mode 100644
index 0000000..396b7f4
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
+ * (https://www.khadas.com)
+ */
+
+/dts-v1/;
+#include "rk3399-khadas-edge.dtsi"
+
+/ {
+	model = "Khadas Edge-V";
+	compatible = "khadas,edge-v", "rockchip,rk3399";
+};
+
+&gmac {
+	status = "okay";
+};
+

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts line 28

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts new file +10 -0
+&pcie_phy {
+	status = "okay";
+};
+
+&pcie0 {
+	ep-gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
+	num-lanes = <4>;
+	status = "okay";
+};
+

Both Captain and Edge-V seem to be identical from a component point of view, so should likely share the same dts, or is there some major difference coming later?

For the time being you can represent the individual boards like:

	model = "Khadas Edge-V/Captain";
	compatible = "khadas,edge-v", "khadas,edge-captain", "rockchip,rk3399";

Also to show that it's Edge+Captain baseboard, maybe you want to change the name like shown above (see rk3399-puma-haikou for a similar setup).

Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts new file +6 -0
new file mode 100644
index 0000000..f0d5bae
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
+ * (https://www.khadas.com)
+ */
+

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts line 16

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts new file +10 -0
+/dts-v1/;
+#include "rk3399-khadas-edge.dtsi"
+
+/ {
+	model = "Khadas Edge";
+	compatible = "khadas,edge", "rockchip,rk3399";
+};
+
+&gmac {
+	status = "disabled";

the Edge-V/Captain boards do enable the gmac, so you shouldn't need a special disable here. Just keep it disabled in the edge.dtsi [aka it comes in the disabled state from rk3399.dtsi already].

Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts new file +1 -0
+};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +0 -0
new file mode 100644
index 0000000..872b535
@@ -0,0 +1,795 @@

[...]

Quoted 4 lines

+&gmac {

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +3 -0
+	assigned-clocks = <&cru SCLK_RMII_SRC>;
+	assigned-clock-parents = <&clkin_gmac>;
+	clock_in_out = "input";

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi line 237

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +10 -0
+	phy-supply = <&vcc_lan>;
+	phy-mode = "rgmii";
+	pinctrl-names = "default";
+	pinctrl-0 = <&rgmii_pins>;
+	snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+	snps,reset-active-low;
+	snps,reset-delays-us = <0 10000 50000>;
+	tx_delay = <0x28>;
+	rx_delay = <0x11>;
+	status = "disabled";

status is disabled coming from rk3399.dtsi, so there is no need to "re-disable" it here.

Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +2 -0
+};
+

[...]

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi line 639

Quoted 9 lines

+&sdio0 {

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +8 -0
+	/* WiFi & BT combo module Ampak AP6356S */
+	bus-width = <4>;
+	cap-sdio-irq;
+	cap-sd-highspeed;
+	keep-power-in-suspend;
+	mmc-pwrseq = <&sdio_pwrseq>;
+	non-removable;
+	num-slots = <1>;

num-slots is not needed anymore

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi line 644

Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +5 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
+	sd-uhs-sdr104;
+
+	/* Power supply */

drop that comment and blank line please. Properties called *-supply already tell you that they are power supplies :-) .

Heiko

author
#2 lore raw

Hello Heiko,

Thanks for your review.

Quoted 3 lines

Both Captain and Edge-V seem to be identical from a component point of view, so should likely share the same dts, or is there some major difference coming later?

This is the first patch to support Khadas Edge/Edge-V/Captain board, so I just add basic dts nodes.

For Captain has more peripherals then Edge-V, so the dts will be different in the future, but it is the same now.

Quoted 203 lines · Heiko Stuebner <[email protected]> 于2019年6月4日周二 下午10:08写道:

Hi Nick,

devicetrees look mostly good, with a bit of "bookkeeping" issues and some small nits below.

Am Dienstag, 28. Mai 2019, 11:21:07 CEST schrieb [email protected]:

Quoted 1 line

From: Nick <[email protected]>

Can you provide a full name (first-+surename) for patch from and Signed-off lines please?

Quoted 10 lines

Add devicetree support for Khadas Edge/Edge-V/Captain boards. Khadas Edge is an expandable Rockchip RK3399 board with goldfinger. Khadas Captain is the carrier board for Khadas Edge. Khadas Edge-V is a Khadas VIM form factor Rockchip RK3399 board.

---
 arch/arm64/boot/dts/rockchip/Makefile              |   3 +
 .../boot/dts/rockchip/rk3399-khadas-captain.dts    |  27 +
 .../boot/dts/rockchip/rk3399-khadas-edge-v.dts     |  28 +

when adding boards, please also make sure to add entries to
Documentation/devicetree/bindings/arm/rockchip.yaml

Take a look at the "FriendlyElec NanoPi4 series boards" for an example on how to add a family of boards like your Edge/Captain.

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm64/boot/dts/rockchip/rk3399-khadas-captain.dts

Review

Quoted 33 lines

new file mode 100644
index 0000000..85eb51c

arch/arm64/boot/dts/rockchip/rk3399-khadas-captain.dts new file +27 -0
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
+ * (https://www.khadas.com)
+ */
+
+/dts-v1/;
+#include "rk3399-khadas-edge.dtsi"
+
+/ {
+     model = "Khadas Captain";
+     compatible = "khadas,captain", "rockchip,rk3399";
+};
+
+&gmac {
+     status = "okay";
+};
+
+&pcie_phy {
+     status = "okay";
+};
+
+&pcie0 {
+     ep-gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
+     num-lanes = <4>;
+     status = "okay";
+};
(quoted diff) +0 -0

b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts

Quoted 23 lines

new file mode 100644
index 0000000..396b7f4

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts new file +18 -0
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
+ * (https://www.khadas.com)
+ */
+
+/dts-v1/;
+#include "rk3399-khadas-edge.dtsi"
+
+/ {
+     model = "Khadas Edge-V";
+     compatible = "khadas,edge-v", "rockchip,rk3399";
+};
+
+&gmac {
+     status = "okay";
+};
+

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts line 28

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts new file +10 -0
+&pcie_phy {
+     status = "okay";
+};
+
+&pcie0 {
+     ep-gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
+     num-lanes = <4>;
+     status = "okay";
+};
+

Both Captain and Edge-V seem to be identical from a component point of view, so should likely share the same dts, or is there some major difference coming later?

For the time being you can represent the individual boards like:

model = "Khadas Edge-V/Captain"; compatible = "khadas,edge-v", "khadas,edge-captain",
"rockchip,rk3399";

Also to show that it's Edge+Captain baseboard, maybe you want to change the name like shown above (see rk3399-puma-haikou for a similar setup).

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts

Quoted 11 lines

new file mode 100644
index 0000000..f0d5bae

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts new file +6 -0
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
+ * (https://www.khadas.com)
+ */
+

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts line 16

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts new file +10 -0
+/dts-v1/;
+#include "rk3399-khadas-edge.dtsi"
+
+/ {
+     model = "Khadas Edge";
+     compatible = "khadas,edge", "rockchip,rk3399";
+};
+
+&gmac {
+     status = "disabled";

the Edge-V/Captain boards do enable the gmac, so you shouldn't need a special disable here. Just keep it disabled in the edge.dtsi [aka it comes in the disabled state from rk3399.dtsi already].

Review

Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts new file +1 -0
+};
(quoted diff) +0 -0

b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi

Quoted 5 lines

new file mode 100644
index 0000000..872b535

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +0 -0
@@ -0,0 +1,795 @@

[...]

Quoted 4 lines

+&gmac {

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +3 -0
+     assigned-clocks = <&cru SCLK_RMII_SRC>;
+     assigned-clock-parents = <&clkin_gmac>;
+     clock_in_out = "input";

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi line 237

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +10 -0
+     phy-supply = <&vcc_lan>;
+     phy-mode = "rgmii";
+     pinctrl-names = "default";
+     pinctrl-0 = <&rgmii_pins>;
+     snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+     snps,reset-active-low;
+     snps,reset-delays-us = <0 10000 50000>;
+     tx_delay = <0x28>;
+     rx_delay = <0x11>;
+     status = "disabled";

status is disabled coming from rk3399.dtsi, so there is no need to "re-disable" it here.

Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +2 -0
+};
+

[...]

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi line 639

Quoted 9 lines

+&sdio0 {

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +8 -0
+     /* WiFi & BT combo module Ampak AP6356S */
+     bus-width = <4>;
+     cap-sdio-irq;
+     cap-sd-highspeed;
+     keep-power-in-suspend;
+     mmc-pwrseq = <&sdio_pwrseq>;
+     non-removable;
+     num-slots = <1>;

num-slots is not needed anymore

arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi line 644

Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +5 -0
+     pinctrl-names = "default";
+     pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
+     sd-uhs-sdr104;
+
+     /* Power supply */

drop that comment and blank line please. Properties called *-supply already tell you that they are power supplies :-) .

Heiko

maintainer
#3 lore raw

Am Montag, 10. Juni 2019, 09:19:52 CEST schrieb Nick Xie:

Quoted 8 lines

Hello Heiko,

Thanks for your review.

Quoted 3 lines

Both Captain and Edge-V seem to be identical from a component point of view, so should likely share the same dts, or is there some major difference coming later?

Quoted 5 lines

This is the first patch to support Khadas Edge/Edge-V/Captain board, so I just add basic dts nodes.

For Captain has more peripherals then Edge-V, so the dts will be different in the future, but it is the same now.

Sounds reasonable, thanks for the clarification.

Heiko

#4 lore raw

PATCH v2 1/1 arm64: dts: rockchip: Add support for Khadas Edge/Edge-V/Captain boards

In reply to [email protected]

From: Nick Xie <[email protected]>

Add devicetree support for Khadas Edge/Edge-V/Captain boards. Khadas Edge is an expandable Rockchip RK3399 board with goldfinger. Khadas Captain is the carrier board for Khadas Edge. Khadas Edge-V is a Khadas VIM form factor Rockchip RK3399 board.

---
Changes for v2:
- DTS tidy up
- Use full name for patch and Signed-off lines
- Add entries to rockchip.yaml
- Rename DTS for Khadas Captain board

 .../devicetree/bindings/arm/rockchip.yaml          |   8 +
 arch/arm64/boot/dts/rockchip/Makefile              |   3 +
 .../dts/rockchip/rk3399-khadas-edge-captain.dts    |  27 +
 .../boot/dts/rockchip/rk3399-khadas-edge-v.dts     |  27 +
 .../arm64/boot/dts/rockchip/rk3399-khadas-edge.dts |  13 +
 .../boot/dts/rockchip/rk3399-khadas-edge.dtsi      | 790 +++++++++++++++++++++
 6 files changed, 868 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-captain.dts
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
Documentation/devicetree/bindings/arm/rockchip.yaml +8 -0
index 5c6bbf1..eef822c 100644
@@ -316,6 +316,14 @@ properties:
           - const: haoyu,marsboard-rk3066
           - const: rockchip,rk3066a
 
+      - description: Khadas Edge series boards
+        items:
+          - enum:
+              - khadas,edge
+              - khadas,edge-captain
+              - khadas,edge-v
+          - const: rockchip,rk3399
+
       - description: mqmaker MiQi
         items:
           - const: mqmaker,miqi
arch/arm64/boot/dts/rockchip/Makefile +3 -0
index 5f2687a..b50889a 100644
@@ -16,6 +16,9 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-bob.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-inx.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-kd.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge-captain.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge-v.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopc-t4.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-m4.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-neo4.dtb
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-captain.dts new file +27 -0
new file mode 100644
index 0000000..8302e51
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
+ * (https://www.khadas.com)
+ */
+
+/dts-v1/;
+#include "rk3399-khadas-edge.dtsi"
+
+/ {
+	model = "Khadas Edge-Captain";
+	compatible = "khadas,edge-captain", "rockchip,rk3399";
+};
+
+&gmac {
+	status = "okay";
+};
+
+&pcie_phy {
+	status = "okay";
+};
+
+&pcie0 {
+	ep-gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
+	num-lanes = <4>;
+	status = "okay";
+};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts new file +27 -0
new file mode 100644
index 0000000..f5dcb99
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
+ * (https://www.khadas.com)
+ */
+
+/dts-v1/;
+#include "rk3399-khadas-edge.dtsi"
+
+/ {
+	model = "Khadas Edge-V";
+	compatible = "khadas,edge-v", "rockchip,rk3399";
+};
+
+&gmac {
+	status = "okay";
+};
+
+&pcie_phy {
+	status = "okay";
+};
+
+&pcie0 {
+	ep-gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
+	num-lanes = <4>;
+	status = "okay";
+};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts new file +13 -0
new file mode 100644
index 0000000..31616e7
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
+ * (https://www.khadas.com)
+ */
+
+/dts-v1/;
+#include "rk3399-khadas-edge.dtsi"
+
+/ {
+	model = "Khadas Edge";
+	compatible = "khadas,edge", "rockchip,rk3399";
+};
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi new file +790 -0

790 lines not on this page · raw message

Signature · 1 line
2.7.4
maintainer
#5 lore raw

Am Montag, 10. Juni 2019, 09:57:53 CEST schrieb [email protected]:

Quoted 8 lines

From: Nick Xie <[email protected]>

Add devicetree support for Khadas Edge/Edge-V/Captain boards. Khadas Edge is an expandable Rockchip RK3399 board with goldfinger. Khadas Captain is the carrier board for Khadas Edge. Khadas Edge-V is a Khadas VIM form factor Rockchip RK3399 board.

applied for 5.3 after doing some style-fixes to the edge.dtsi (2 missing gpio constants, some newlines and sdio-regulator references were missing "<..>")

Please double-check the result

Thanks
Heiko

author
#6 lore raw

Thanks, I'll check them out.

But there is a small typo:
https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/tree/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi?h=v5.3-armsoc/dts64&id=910249897d13beaa0b46069e27139024cd77e916#n299

*22 (GPIO1_C6)* should be *RK_PC6* NOT *RK_PD6*.

Quoted 22 lines · Heiko Stuebner <[email protected]> 于2019年6月14日周五 下午7:32写道:

Am Montag, 10. Juni 2019, 09:57:53 CEST schrieb [email protected]:

Quoted 8 lines

From: Nick Xie <[email protected]>

Add devicetree support for Khadas Edge/Edge-V/Captain boards. Khadas Edge is an expandable Rockchip RK3399 board with goldfinger. Khadas Captain is the carrier board for Khadas Edge. Khadas Edge-V is a Khadas VIM form factor Rockchip RK3399 board.

applied for 5.3 after doing some style-fixes to the edge.dtsi (2 missing gpio constants, some newlines and sdio-regulator references were missing "<..>")

Please double-check the result

Thanks
Heiko

maintainer
#7 lore raw

Hi Nick,

Am Freitag, 14. Juni 2019, 15:32:11 CEST schrieb Nick Xie:

Quoted 6 lines

Thanks, I'll check them out.

But there is a small typo:
https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/tree/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi?h=v5.3-armsoc/dts64&id=910249897d13beaa0b46069e27139024cd77e916#n299

*22 (GPIO1_C6)* should be *RK_PC6* NOT *RK_PD6*.

thanks for double-checking ... I've updated the commit to use the right gpio now.

Heiko

Quoted 25 lines
Quoted 22 lines · Heiko Stuebner <[email protected]> 于2019年6月14日周五 下午7:32写道:

Am Montag, 10. Juni 2019, 09:57:53 CEST schrieb [email protected]:

Quoted 8 lines

From: Nick Xie <[email protected]>

Add devicetree support for Khadas Edge/Edge-V/Captain boards. Khadas Edge is an expandable Rockchip RK3399 board with goldfinger. Khadas Captain is the carrier board for Khadas Edge. Khadas Edge-V is a Khadas VIM form factor Rockchip RK3399 board.

applied for 5.3 after doing some style-fixes to the edge.dtsi (2 missing gpio constants, some newlines and sdio-regulator references were missing "<..>")

Please double-check the result

Thanks
Heiko

author
#8 lore raw

Awesome, thanks!

Quoted 46 lines · Heiko Stübner <[email protected]> 于2019年6月14日周五 下午10:01写道:

Hi Nick,

Am Freitag, 14. Juni 2019, 15:32:11 CEST schrieb Nick Xie:

Quoted 4 lines

Thanks, I'll check them out.

But there is a small typo:

https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/tree/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi?h=v5.3-armsoc/dts64&id=910249897d13beaa0b46069e27139024cd77e916#n299

Quoted 2 lines

*22 (GPIO1_C6)* should be *RK_PC6* NOT *RK_PD6*.

thanks for double-checking ... I've updated the commit to use the right gpio now.

Heiko

Quoted 25 lines
Quoted 22 lines · Heiko Stuebner <[email protected]> 于2019年6月14日周五 下午7:32写道:

Am Montag, 10. Juni 2019, 09:57:53 CEST schrieb [email protected]:

Quoted 8 lines

From: Nick Xie <[email protected]>

Add devicetree support for Khadas Edge/Edge-V/Captain boards. Khadas Edge is an expandable Rockchip RK3399 board with goldfinger. Khadas Captain is the carrier board for Khadas Edge. Khadas Edge-V is a Khadas VIM form factor Rockchip RK3399 board.

applied for 5.3 after doing some style-fixes to the edge.dtsi (2 missing gpio constants, some newlines and sdio-regulator references were missing "<..>")

Please double-check the result

Thanks
Heiko