From: Heiko Stuebner <heiko@sntech.de> To: xieqinick@gmail.com Cc: robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, robh@kernel.org, nick@khadas.com Subject: Re: [PATCH] arm64: dts: rockchip: Add support for Khadas Edge/Edge-V/Captain boards Date: Tue, 04 Jun 2019 16:08:20 +0200 [thread overview] Message-ID: <2074921.iWOsiWxYGh@phil> (raw) In-Reply-To: <1559035267-1884-1-git-send-email-xieqinick@gmail.com> 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 xieqinick@gmail.com: > From: Nick <nick@khadas.com> Can you provide a full name (first-+surename) for patch from and Signed-off lines please? > 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. > > Signed-off-by: Nick <nick@khadas.com> > --- > 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. > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-captain.dts b/arch/arm64/boot/dts/rockchip/rk3399-khadas-captain.dts > new file mode 100644 > index 0000000..85eb51c > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-captain.dts > @@ -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"; > +}; > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts > new file mode 100644 > index 0000000..396b7f4 > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts > @@ -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"; > +}; > + 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). > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts > new file mode 100644 > index 0000000..f0d5bae > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts > @@ -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"; 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]. > +}; > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi > new file mode 100644 > index 0000000..872b535 > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi > @@ -0,0 +1,795 @@ [...] > +&gmac { > + assigned-clocks = <&cru SCLK_RMII_SRC>; > + assigned-clock-parents = <&clkin_gmac>; > + clock_in_out = "input"; > + 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. > +}; > + [...] > +&sdio0 { > + /* 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 > + 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
WARNING: multiple messages have this Message-ID (diff)
From: Heiko Stuebner <heiko@sntech.de> To: xieqinick@gmail.com Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, robh@kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, robh+dt@kernel.org, nick@khadas.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] arm64: dts: rockchip: Add support for Khadas Edge/Edge-V/Captain boards Date: Tue, 04 Jun 2019 16:08:20 +0200 [thread overview] Message-ID: <2074921.iWOsiWxYGh@phil> (raw) In-Reply-To: <1559035267-1884-1-git-send-email-xieqinick@gmail.com> 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 xieqinick@gmail.com: > From: Nick <nick@khadas.com> Can you provide a full name (first-+surename) for patch from and Signed-off lines please? > 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. > > Signed-off-by: Nick <nick@khadas.com> > --- > 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. > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-captain.dts b/arch/arm64/boot/dts/rockchip/rk3399-khadas-captain.dts > new file mode 100644 > index 0000000..85eb51c > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-captain.dts > @@ -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"; > +}; > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts > new file mode 100644 > index 0000000..396b7f4 > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-v.dts > @@ -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"; > +}; > + 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). > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts > new file mode 100644 > index 0000000..f0d5bae > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dts > @@ -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"; 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]. > +}; > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi > new file mode 100644 > index 0000000..872b535 > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi > @@ -0,0 +1,795 @@ [...] > +&gmac { > + assigned-clocks = <&cru SCLK_RMII_SRC>; > + assigned-clock-parents = <&clkin_gmac>; > + clock_in_out = "input"; > + 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. > +}; > + [...] > +&sdio0 { > + /* 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 > + 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-06-04 14:08 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-28 9:21 [PATCH] arm64: dts: rockchip: Add support for Khadas Edge/Edge-V/Captain boards xieqinick 2019-05-28 9:21 ` xieqinick 2019-06-04 14:08 ` Heiko Stuebner [this message] 2019-06-04 14:08 ` Heiko Stuebner 2019-06-10 7:19 ` Nick Xie 2019-06-14 11:31 ` Heiko Stuebner 2019-06-14 11:31 ` Heiko Stuebner 2019-06-10 7:57 ` [PATCH v2] " xieqinick 2019-06-10 7:57 ` xieqinick 2019-06-14 11:32 ` Heiko Stuebner 2019-06-14 11:32 ` Heiko Stuebner 2019-06-14 13:32 ` Nick Xie 2019-06-14 14:01 ` Heiko Stübner 2019-06-14 14:01 ` Heiko Stübner 2019-06-14 14:06 ` Nick Xie
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=2074921.iWOsiWxYGh@phil \ --to=heiko@sntech.de \ --cc=devicetree@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=mark.rutland@arm.com \ --cc=nick@khadas.com \ --cc=robh+dt@kernel.org \ --cc=robh@kernel.org \ --cc=xieqinick@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.