* [PATCH 1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S
@ 2024-10-20 17:39 Tianling Shen
2024-10-20 17:39 ` [PATCH 2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board Tianling Shen
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Tianling Shen @ 2024-10-20 17:39 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Chris Morgan, Jonas Karlman, Andy Yan, Jagan Teki, Tianling Shen
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
Add devicetree binding for FriendlyARM NanoPi R3S.
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
---
Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
index 70bd2e4d1195..862cc2982086 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.yaml
+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
@@ -244,6 +244,11 @@ properties:
- friendlyarm,nanopi-r2s-plus
- const: rockchip,rk3328
+ - description: FriendlyElec NanoPi R3S
+ items:
+ - const: friendlyarm,nanopi-r3s
+ - const: rockchip,rk3566
+
- description: FriendlyElec NanoPi4 series boards
items:
- enum:
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board
2024-10-20 17:39 [PATCH 1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S Tianling Shen
@ 2024-10-20 17:39 ` Tianling Shen
2024-10-22 16:49 ` Jonas Karlman
2024-10-21 11:47 ` [PATCH 1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S Conor Dooley
2024-10-22 14:12 ` Heiko Stuebner
2 siblings, 1 reply; 11+ messages in thread
From: Tianling Shen @ 2024-10-20 17:39 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Chris Morgan, Jonas Karlman, Andy Yan, Jagan Teki, Tianling Shen
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
The NanoPi R3S(as "R3S") is an open source platform with dual-Gbps
Ethernet ports designed and developed by FriendlyElec for IoT
applications.
Specification:
- Rockchip RK3566
- 2GB LPDDR4X RAM
- optional 32GB eMMC module
- SD card slot
- 2x 1000 Base-T
- 3x LEDs (POWER, LAN, WAN)
- 2x Buttons (Reset, MaskROM)
- 1x USB 3.0 Port
- Type-C 5V 2A Power
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../boot/dts/rockchip/rk3566-nanopi-r3s.dts | 554 ++++++++++++++++++
2 files changed, 555 insertions(+)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 8e1025cb5d20..e641033d23d1 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -109,6 +109,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-model-a.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-box-demo.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lckfb-tspi.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lubancat-1.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-nanopi-r3s.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
new file mode 100644
index 000000000000..951dd9bcb4b0
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
@@ -0,0 +1,554 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
+ *
+ * Copyright (c) 2024 FriendlyElec Computer Tech. Co., Ltd.
+ * (http://www.friendlyarm.com)
+ *
+ * Copyright (c) 2024 Tianling Shen <cnsztl@gmail.com>
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/soc/rockchip,vop2.h>
+#include "rk3566.dtsi"
+
+/ {
+ model = "FriendlyARM NanoPi R3S";
+ compatible = "friendlyarm,nanopi-r3s", "rockchip,rk3566";
+
+ aliases {
+ ethernet0 = &gmac1;
+ mmc0 = &sdmmc0;
+ mmc1 = &sdhci;
+ };
+
+ chosen: chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&reset_button_pin>;
+
+ button-reset {
+ label = "reset";
+ gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ debounce-interval = <50>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&power_led_pin>, <&lan_led_pin>, <&wan_led_pin>;
+
+ power_led: led-0 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_POWER;
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ lan_led: led-1 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
+ };
+
+ wan_led: led-2 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WAN;
+ gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ vdd_usbc: vdd-usbc-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd_usbc";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vdd_usbc>;
+ };
+
+ vcc3v3_sys: vcc3v3-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_usb: vcc5v0_usb-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_usb_host_en>;
+ regulator-name = "vcc5v0_usb";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy1 {
+ status = "okay";
+};
+
+&combphy2 {
+ status = "okay";
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu1 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu2 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu3 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&gmac1 {
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>;
+ assigned-clock-rates = <0>, <125000000>;
+ clock_in_out = "output";
+ phy-mode = "rgmii-id";
+ phy-handle = <&rgmii_phy1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac1m0_miim
+ &gmac1m0_tx_bus2_level3
+ &gmac1m0_rx_bus2
+ &gmac1m0_rgmii_clk_level2
+ &gmac1m0_rgmii_bus_level3>;
+ snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
+ snps,reset-active-low;
+ /* Reset time is 20ms, 100ms for rtl8211f */
+ snps,reset-delays-us = <0 20000 100000>;
+ status = "okay";
+};
+
+&gpu {
+ mali-supply = <&vdd_gpu>;
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+
+ vdd_cpu: regulator@1c {
+ compatible = "tcs,tcs4525";
+ reg = <0x1c>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <1150000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ rk809: pmic@20 {
+ compatible = "rockchip,rk809";
+ reg = <0x20>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
+ #clock-cells = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_int>;
+ system-power-controller;
+ vcc1-supply = <&vcc3v3_sys>;
+ vcc2-supply = <&vcc3v3_sys>;
+ vcc3-supply = <&vcc3v3_sys>;
+ vcc4-supply = <&vcc3v3_sys>;
+ vcc5-supply = <&vcc3v3_sys>;
+ vcc6-supply = <&vcc3v3_sys>;
+ vcc7-supply = <&vcc3v3_sys>;
+ vcc8-supply = <&vcc3v3_sys>;
+ vcc9-supply = <&vcc3v3_sys>;
+ wakeup-source;
+
+ regulators {
+ vdd_logic: DCDC_REG1 {
+ regulator-name = "vdd_logic";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_gpu: DCDC_REG2 {
+ regulator-name = "vdd_gpu";
+ regulator-always-on;
+ regulator-initial-mode = <0x2>;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_ddr: DCDC_REG3 {
+ regulator-name = "vcc_ddr";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vdd_npu: DCDC_REG4 {
+ regulator-name = "vdd_npu";
+ regulator-initial-mode = <0x2>;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8: DCDC_REG5 {
+ regulator-name = "vcc_1v8";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda0v9_image: LDO_REG1 {
+ regulator-name = "vdda0v9_image";
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <950000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda_0v9: LDO_REG2 {
+ regulator-name = "vdda_0v9";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda0v9_pmu: LDO_REG3 {
+ regulator-name = "vdda0v9_pmu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <900000>;
+ };
+ };
+
+ vccio_acodec: LDO_REG4 {
+ regulator-name = "vccio_acodec";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd: LDO_REG5 {
+ regulator-name = "vccio_sd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_pmu: LDO_REG6 {
+ regulator-name = "vcc3v3_pmu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcca_1v8: LDO_REG7 {
+ regulator-name = "vcca_1v8";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcca1v8_pmu: LDO_REG8 {
+ regulator-name = "vcca1v8_pmu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vcca1v8_image: LDO_REG9 {
+ regulator-name = "vcca1v8_image";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3: SWITCH_REG1 {
+ regulator-name = "vcc_3v3";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_sd: SWITCH_REG2 {
+ regulator-name = "vcc3v3_sd";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&i2c1 {
+ status = "okay";
+
+ hym8563: rtc@51 {
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ #clock-cells = <0>;
+ clock-output-names = "hym8563";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hym8563_int>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
+ wakeup-source;
+ };
+};
+
+&mdio1 {
+ rgmii_phy1: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <ð_phy_reset_pin>;
+ };
+};
+
+&pcie2x1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_reset_h>;
+ reset-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+};
+
+&pinctrl {
+ gpio-leds {
+ lan_led_pin: lan-led-pin {
+ rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ power_led_pin: power-led-pin {
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ wan_led_pin: wan-led-pin {
+ rockchip,pins = <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ gmac {
+ eth_phy_reset_pin: eth-phy-reset-pin {
+ rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ pcie {
+ pcie_reset_h: pcie-reset-h {
+ rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ };
+
+ pmic {
+ pmic_int: pmic-int {
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ rockchip-key {
+ reset_button_pin: reset-button-pin {
+ rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ rtc {
+ hym8563_int: hym8563-int {
+ rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ usb {
+ vcc5v0_usb_host_en: vcc5v0-usb-host-en {
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&pmu_io_domains {
+ status = "okay";
+ pmuio1-supply = <&vcc3v3_pmu>;
+ pmuio2-supply = <&vcc3v3_pmu>;
+ vccio1-supply = <&vccio_acodec>;
+ vccio2-supply = <&vcc_1v8>;
+ vccio3-supply = <&vccio_sd>;
+ vccio4-supply = <&vcc_3v3>;
+ vccio5-supply = <&vcc_1v8>;
+ vccio6-supply = <&vcc_3v3>;
+ vccio7-supply = <&vcc_3v3>;
+};
+
+&sdhci {
+ bus-width = <8>;
+ max-frequency = <200000000>;
+ non-removable;
+ pinctrl-names = "default";
+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
+ status = "okay";
+};
+
+&sdmmc0 {
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ disable-wp;
+ no-sdio;
+ no-mmc;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
+ sd-uhs-sdr50;
+ vmmc-supply = <&vcc3v3_sd>;
+ vqmmc-supply = <&vccio_sd>;
+ status = "okay";
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&usb2phy0 {
+ status = "okay";
+};
+
+&usb2phy0_host {
+ phy-supply = <&vcc5v0_usb>;
+ status = "okay";
+};
+
+&usb2phy0_otg {
+ status = "okay";
+};
+
+&usb_host0_xhci {
+ extcon = <&usb2phy0>;
+ status = "okay";
+};
+
+&usb_host1_xhci {
+ status = "okay";
+};
+
+&vop {
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
+ status = "okay";
+};
+
+&vop_mmu {
+ status = "okay";
+};
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S
2024-10-20 17:39 [PATCH 1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S Tianling Shen
2024-10-20 17:39 ` [PATCH 2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board Tianling Shen
@ 2024-10-21 11:47 ` Conor Dooley
2024-10-22 14:12 ` Heiko Stuebner
2 siblings, 0 replies; 11+ messages in thread
From: Conor Dooley @ 2024-10-21 11:47 UTC (permalink / raw)
To: Tianling Shen
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Chris Morgan, Jonas Karlman, Andy Yan, Jagan Teki, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
On Mon, Oct 21, 2024 at 01:39:45AM +0800, Tianling Shen wrote:
> Add devicetree binding for FriendlyARM NanoPi R3S.
>
> Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S
2024-10-20 17:39 [PATCH 1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S Tianling Shen
2024-10-20 17:39 ` [PATCH 2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board Tianling Shen
2024-10-21 11:47 ` [PATCH 1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S Conor Dooley
@ 2024-10-22 14:12 ` Heiko Stuebner
2024-10-22 17:07 ` Jonas Karlman
2 siblings, 1 reply; 11+ messages in thread
From: Heiko Stuebner @ 2024-10-22 14:12 UTC (permalink / raw)
To: Jagan Teki, Rob Herring, Andy Yan, Tianling Shen, Jonas Karlman,
Krzysztof Kozlowski, Chris Morgan, Conor Dooley
Cc: Heiko Stuebner, linux-kernel, linux-arm-kernel, devicetree,
linux-rockchip
On Mon, 21 Oct 2024 01:39:45 +0800, Tianling Shen wrote:
> Add devicetree binding for FriendlyARM NanoPi R3S.
>
>
Applied, thanks!
[1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S
commit: 1e94bfea52bee081c42ab922c19156dd3d2bade8
[2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board
commit: 50decd493c8394c52d04561fe4ede34df27a46ba
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board
2024-10-20 17:39 ` [PATCH 2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board Tianling Shen
@ 2024-10-22 16:49 ` Jonas Karlman
2024-10-22 17:38 ` Tianling Shen
0 siblings, 1 reply; 11+ messages in thread
From: Jonas Karlman @ 2024-10-22 16:49 UTC (permalink / raw)
To: Tianling Shen, Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chris Morgan,
Andy Yan, Jagan Teki, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Hi Tianling,
On 2024-10-20 19:39, Tianling Shen wrote:
> The NanoPi R3S(as "R3S") is an open source platform with dual-Gbps
> Ethernet ports designed and developed by FriendlyElec for IoT
> applications.
>
> Specification:
> - Rockchip RK3566
> - 2GB LPDDR4X RAM
> - optional 32GB eMMC module
> - SD card slot
> - 2x 1000 Base-T
> - 3x LEDs (POWER, LAN, WAN)
> - 2x Buttons (Reset, MaskROM)
> - 1x USB 3.0 Port
> - Type-C 5V 2A Power
>
> Signed-off-by: Tianling Shen <cnsztl@gmail.com>
> ---
> arch/arm64/boot/dts/rockchip/Makefile | 1 +
> .../boot/dts/rockchip/rk3566-nanopi-r3s.dts | 554 ++++++++++++++++++
> 2 files changed, 555 insertions(+)
> create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
>
> diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
> index 8e1025cb5d20..e641033d23d1 100644
> --- a/arch/arm64/boot/dts/rockchip/Makefile
> +++ b/arch/arm64/boot/dts/rockchip/Makefile
> @@ -109,6 +109,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-model-a.dtb
> dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-box-demo.dtb
> dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lckfb-tspi.dtb
> dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lubancat-1.dtb
> +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-nanopi-r3s.dtb
> dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
> dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
> dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb
> diff --git a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
> new file mode 100644
> index 000000000000..951dd9bcb4b0
> --- /dev/null
> +++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
> @@ -0,0 +1,554 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> +/*
> + * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
> + *
> + * Copyright (c) 2024 FriendlyElec Computer Tech. Co., Ltd.
> + * (http://www.friendlyarm.com/
> + *
> + * Copyright (c) 2024 Tianling Shen <cnsztl@gmail.com>
> + */
> +
> +/dts-v1/;
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/pinctrl/rockchip.h>
> +#include <dt-bindings/soc/rockchip,vop2.h>
> +#include "rk3566.dtsi"
> +
> +/ {
> + model = "FriendlyARM NanoPi R3S";
Please use the marketing name, and the name added in binding:
FriendlyElec NanoPi R3S
> + compatible = "friendlyarm,nanopi-r3s", "rockchip,rk3566";
> +
> + aliases {
> + ethernet0 = &gmac1;
> + mmc0 = &sdmmc0;
> + mmc1 = &sdhci;
This board comes with on-board eMMC this please use mmc0 as alias for
&sdhci; and mmc1 for sd-card.
> + };
> +
> + chosen: chosen {
> + stdout-path = "serial2:1500000n8";
> + };
> +
> + gpio-keys {
> + compatible = "gpio-keys";
> + pinctrl-names = "default";
> + pinctrl-0 = <&reset_button_pin>;
> +
> + button-reset {
> + label = "reset";
> + gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_RESTART>;
> + debounce-interval = <50>;
> + };
> + };
> +
> + gpio-leds {
> + compatible = "gpio-leds";
> + pinctrl-names = "default";
> + pinctrl-0 = <&power_led_pin>, <&lan_led_pin>, <&wan_led_pin>;
> +
> + power_led: led-0 {
> + color = <LED_COLOR_ID_RED>;
> + function = LED_FUNCTION_POWER;
> + gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
> + default-state = "on";
> + };
> +
> + lan_led: led-1 {
> + color = <LED_COLOR_ID_GREEN>;
> + function = LED_FUNCTION_LAN;
> + gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
> + };
> +
> + wan_led: led-2 {
> + color = <LED_COLOR_ID_GREEN>;
> + function = LED_FUNCTION_WAN;
> + gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
> + };
> + };
> +
> + vdd_usbc: vdd-usbc-regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "vdd_usbc";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + };
> +
> + vcc5v0_sys: vcc5v0-sys-regulator {
This and other fixed regulators does not match the recommended naming
pattern: ^regulator-(.*)$, please rename fixed regulator nodes.
> + compatible = "regulator-fixed";
> + regulator-name = "vcc5v0_sys";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + vin-supply = <&vdd_usbc>;
> + };
> +
> + vcc3v3_sys: vcc3v3-sys-regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "vcc3v3_sys";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + vin-supply = <&vcc5v0_sys>;
> + };
> +
> + vcc5v0_usb: vcc5v0_usb-regulator {
> + compatible = "regulator-fixed";
> + enable-active-high;
> + gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&vcc5v0_usb_host_en>;
> + regulator-name = "vcc5v0_usb";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + vin-supply = <&vcc5v0_sys>;
> + };
> +};
> +
> +&combphy1 {
> + status = "okay";
> +};
> +
> +&combphy2 {
> + status = "okay";
> +};
> +
> +&cpu0 {
> + cpu-supply = <&vdd_cpu>;
> +};
> +
> +&cpu1 {
> + cpu-supply = <&vdd_cpu>;
> +};
> +
> +&cpu2 {
> + cpu-supply = <&vdd_cpu>;
> +};
> +
> +&cpu3 {
> + cpu-supply = <&vdd_cpu>;
> +};
> +
> +&gmac1 {
> + assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
> + assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>;
> + assigned-clock-rates = <0>, <125000000>;
> + clock_in_out = "output";
> + phy-mode = "rgmii-id";
> + phy-handle = <&rgmii_phy1>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&gmac1m0_miim
> + &gmac1m0_tx_bus2_level3
> + &gmac1m0_rx_bus2
> + &gmac1m0_rgmii_clk_level2
> + &gmac1m0_rgmii_bus_level3>;
> + snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
> + snps,reset-active-low;
> + /* Reset time is 20ms, 100ms for rtl8211f */
> + snps,reset-delays-us = <0 20000 100000>;
These snps,reset props is deprecated, please add reset props to the
Ethernet PHY node.
> + status = "okay";
> +};
> +
> +&gpu {
> + mali-supply = <&vdd_gpu>;
> + status = "okay";
> +};
> +
> +&i2c0 {
> + status = "okay";
> +
> + vdd_cpu: regulator@1c {
> + compatible = "tcs,tcs4525";
> + reg = <0x1c>;
> + fcs,suspend-voltage-selector = <1>;
> + regulator-name = "vdd_cpu";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <800000>;
> + regulator-max-microvolt = <1150000>;
> + regulator-ramp-delay = <2300>;
> + vin-supply = <&vcc5v0_sys>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + rk809: pmic@20 {
> + compatible = "rockchip,rk809";
> + reg = <0x20>;
> + interrupt-parent = <&gpio0>;
> + interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
> + #clock-cells = <1>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pmic_int>;
> + system-power-controller;
> + vcc1-supply = <&vcc3v3_sys>;
> + vcc2-supply = <&vcc3v3_sys>;
> + vcc3-supply = <&vcc3v3_sys>;
> + vcc4-supply = <&vcc3v3_sys>;
> + vcc5-supply = <&vcc3v3_sys>;
> + vcc6-supply = <&vcc3v3_sys>;
> + vcc7-supply = <&vcc3v3_sys>;
> + vcc8-supply = <&vcc3v3_sys>;
> + vcc9-supply = <&vcc3v3_sys>;
> + wakeup-source;
> +
> + regulators {
> + vdd_logic: DCDC_REG1 {
> + regulator-name = "vdd_logic";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-initial-mode = <0x2>;
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-ramp-delay = <6001>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vdd_gpu: DCDC_REG2 {
> + regulator-name = "vdd_gpu";
> + regulator-always-on;
> + regulator-initial-mode = <0x2>;
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-ramp-delay = <6001>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vcc_ddr: DCDC_REG3 {
> + regulator-name = "vcc_ddr";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-initial-mode = <0x2>;
> +
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + };
> + };
> +
> + vdd_npu: DCDC_REG4 {
> + regulator-name = "vdd_npu";
> + regulator-initial-mode = <0x2>;
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-ramp-delay = <6001>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vcc_1v8: DCDC_REG5 {
> + regulator-name = "vcc_1v8";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vdda0v9_image: LDO_REG1 {
> + regulator-name = "vdda0v9_image";
> + regulator-min-microvolt = <950000>;
> + regulator-max-microvolt = <950000>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vdda_0v9: LDO_REG2 {
> + regulator-name = "vdda_0v9";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <900000>;
> + regulator-max-microvolt = <900000>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vdda0v9_pmu: LDO_REG3 {
> + regulator-name = "vdda0v9_pmu";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <900000>;
> + regulator-max-microvolt = <900000>;
> +
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = <900000>;
> + };
> + };
> +
> + vccio_acodec: LDO_REG4 {
> + regulator-name = "vccio_acodec";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vccio_sd: LDO_REG5 {
> + regulator-name = "vccio_sd";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <3300000>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vcc3v3_pmu: LDO_REG6 {
> + regulator-name = "vcc3v3_pmu";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> +
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = <3300000>;
> + };
> + };
> +
> + vcca_1v8: LDO_REG7 {
> + regulator-name = "vcca_1v8";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vcca1v8_pmu: LDO_REG8 {
> + regulator-name = "vcca1v8_pmu";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> +
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = <1800000>;
> + };
> + };
> +
> + vcca1v8_image: LDO_REG9 {
> + regulator-name = "vcca1v8_image";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vcc_3v3: SWITCH_REG1 {
> + regulator-name = "vcc_3v3";
> + regulator-always-on;
> + regulator-boot-on;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vcc3v3_sd: SWITCH_REG2 {
> + regulator-name = "vcc3v3_sd";
> + regulator-always-on;
> + regulator-boot-on;
> +
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> + };
> + };
> +};
> +
> +&i2c1 {
> + status = "okay";
> +
> + hym8563: rtc@51 {
> + compatible = "haoyu,hym8563";
> + reg = <0x51>;
> + #clock-cells = <0>;
> + clock-output-names = "hym8563";
> + pinctrl-names = "default";
> + pinctrl-0 = <&hym8563_int>;
> + interrupt-parent = <&gpio0>;
> + interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
> + wakeup-source;
> + };
> +};
> +
> +&mdio1 {
> + rgmii_phy1: ethernet-phy@1 {
> + compatible = "ethernet-phy-ieee802.3-c22";
> + reg = <1>;
> + interrupt-parent = <&gpio4>;
> + interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <ð_phy_reset_pin>;
Please add the reset props here.
> + };
> +};
> +
> +&pcie2x1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pcie_reset_h>;
> + reset-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
> + status = "okay";
> +};
> +
> +&pinctrl {
> + gpio-leds {
> + lan_led_pin: lan-led-pin {
> + rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> +
> + power_led_pin: power-led-pin {
> + rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> +
> + wan_led_pin: wan-led-pin {
> + rockchip,pins = <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> + };
> +
> + gmac {
> + eth_phy_reset_pin: eth-phy-reset-pin {
> + rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
> + };
> + };
> +
> + pcie {
> + pcie_reset_h: pcie-reset-h {
> + rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
> + };
> + };
> +
> + pmic {
> + pmic_int: pmic-int {
> + rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
> + };
> + };
> +
> + rockchip-key {
> + reset_button_pin: reset-button-pin {
> + rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
> + };
> + };
> +
> + rtc {
> + hym8563_int: hym8563-int {
> + rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
> + };
> + };
> +
> + usb {
> + vcc5v0_usb_host_en: vcc5v0-usb-host-en {
> + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> + };
> +};
> +
> +&pmu_io_domains {
> + status = "okay";
The status prop is typically the last prop.
> + pmuio1-supply = <&vcc3v3_pmu>;
> + pmuio2-supply = <&vcc3v3_pmu>;
> + vccio1-supply = <&vccio_acodec>;
> + vccio2-supply = <&vcc_1v8>;
> + vccio3-supply = <&vccio_sd>;
> + vccio4-supply = <&vcc_3v3>;
> + vccio5-supply = <&vcc_1v8>;
> + vccio6-supply = <&vcc_3v3>;
> + vccio7-supply = <&vcc_3v3>;
> +};
> +
> +&sdhci {
> + bus-width = <8>;
> + max-frequency = <200000000>;
> + non-removable;
Please add the hs200 prop here, or we will need to add is in U-Boot to
be able to boot from eMMC.
Regards,
Jonas
> + pinctrl-names = "default";
> + pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
> + status = "okay";
> +};
> +
> +&sdmmc0 {
> + bus-width = <4>;
> + cap-mmc-highspeed;
> + cap-sd-highspeed;
> + disable-wp;
> + no-sdio;
> + no-mmc;
> + pinctrl-names = "default";
> + pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
> + sd-uhs-sdr50;
> + vmmc-supply = <&vcc3v3_sd>;
> + vqmmc-supply = <&vccio_sd>;
> + status = "okay";
> +};
> +
> +&tsadc {
> + status = "okay";
> +};
> +
> +&uart2 {
> + status = "okay";
> +};
> +
> +&usb2phy0 {
> + status = "okay";
> +};
> +
> +&usb2phy0_host {
> + phy-supply = <&vcc5v0_usb>;
> + status = "okay";
> +};
> +
> +&usb2phy0_otg {
> + status = "okay";
> +};
> +
> +&usb_host0_xhci {
> + extcon = <&usb2phy0>;
> + status = "okay";
> +};
> +
> +&usb_host1_xhci {
> + status = "okay";
> +};
> +
> +&vop {
> + assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
> + assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
> + status = "okay";
> +};
> +
> +&vop_mmu {
> + status = "okay";
> +};
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S
2024-10-22 14:12 ` Heiko Stuebner
@ 2024-10-22 17:07 ` Jonas Karlman
2024-10-22 20:34 ` Heiko Stübner
0 siblings, 1 reply; 11+ messages in thread
From: Jonas Karlman @ 2024-10-22 17:07 UTC (permalink / raw)
To: Heiko Stuebner, Tianling Shen
Cc: Jagan Teki, Rob Herring, Andy Yan, Krzysztof Kozlowski,
Chris Morgan, Conor Dooley, linux-kernel, linux-arm-kernel,
devicetree, linux-rockchip
Hi Heiko,
On 2024-10-22 16:12, Heiko Stuebner wrote:
> On Mon, 21 Oct 2024 01:39:45 +0800, Tianling Shen wrote:
>> Add devicetree binding for FriendlyARM NanoPi R3S.
>>
>>
>
> Applied, thanks!
>
> [1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S
> commit: 1e94bfea52bee081c42ab922c19156dd3d2bade8
> [2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board
> commit: 50decd493c8394c52d04561fe4ede34df27a46ba
I just sent out a review on this patch [1], please leave more then a day
or two to finish up a review ;-)
[1] https://lore.kernel.org/r/13bb8657-f048-4f79-a2c1-3680445f2bef@kwiboo.se/
Regards,
Jonas
>
> Best regards,
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board
2024-10-22 16:49 ` Jonas Karlman
@ 2024-10-22 17:38 ` Tianling Shen
2024-10-22 17:56 ` Jonas Karlman
0 siblings, 1 reply; 11+ messages in thread
From: Tianling Shen @ 2024-10-22 17:38 UTC (permalink / raw)
To: Jonas Karlman
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Chris Morgan, Andy Yan, Jagan Teki, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 26507 bytes --]
Hi Jonas,
On Wed, Oct 23, 2024 at 12:49 AM Jonas Karlman <jonas@kwiboo.se> wrote:
>
> Hi Tianling,
>
> On 2024-10-20 19:39, Tianling Shen wrote:
> > The NanoPi R3S(as "R3S") is an open source platform with dual-Gbps
> > Ethernet ports designed and developed by FriendlyElec for IoT
> > applications.
> >
> > Specification:
> > - Rockchip RK3566
> > - 2GB LPDDR4X RAM
> > - optional 32GB eMMC module
> > - SD card slot
> > - 2x 1000 Base-T
> > - 3x LEDs (POWER, LAN, WAN)
> > - 2x Buttons (Reset, MaskROM)
> > - 1x USB 3.0 Port
> > - Type-C 5V 2A Power
> >
> > Signed-off-by: Tianling Shen <cnsztl@gmail.com>
> > ---
> > arch/arm64/boot/dts/rockchip/Makefile | 1 +
> > .../boot/dts/rockchip/rk3566-nanopi-r3s.dts | 554 ++++++++++++++++++
> > 2 files changed, 555 insertions(+)
> > create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
> > index 8e1025cb5d20..e641033d23d1 100644
> > --- a/arch/arm64/boot/dts/rockchip/Makefile
> > +++ b/arch/arm64/boot/dts/rockchip/Makefile
> > @@ -109,6 +109,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-model-a.dtb
> > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-box-demo.dtb
> > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lckfb-tspi.dtb
> > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lubancat-1.dtb
> > +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-nanopi-r3s.dtb
> > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
> > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
> > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
> > new file mode 100644
> > index 000000000000..951dd9bcb4b0
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
> > @@ -0,0 +1,554 @@
> > +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> > +/*
> > + * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
> > + *
> > + * Copyright (c) 2024 FriendlyElec Computer Tech. Co., Ltd.
> > + * (http://www.friendlyarm.com/
> > + *
> > + * Copyright (c) 2024 Tianling Shen <cnsztl@gmail.com>
> > + */
> > +
> > +/dts-v1/;
> > +#include <dt-bindings/gpio/gpio.h>
> > +#include <dt-bindings/input/input.h>
> > +#include <dt-bindings/leds/common.h>
> > +#include <dt-bindings/pinctrl/rockchip.h>
> > +#include <dt-bindings/soc/rockchip,vop2.h>
> > +#include "rk3566.dtsi"
> > +
> > +/ {
> > + model = "FriendlyARM NanoPi R3S";
>
> Please use the marketing name, and the name added in binding:
>
> FriendlyElec NanoPi R3S
Sorry for the copy & paste error, will fix it in new patch.
>
> > + compatible = "friendlyarm,nanopi-r3s", "rockchip,rk3566";
> > +
> > + aliases {
> > + ethernet0 = &gmac1;
> > + mmc0 = &sdmmc0;
> > + mmc1 = &sdhci;
>
> This board comes with on-board eMMC this please use mmc0 as alias for
> &sdhci; and mmc1 for sd-card.
Is using mmc0 for sdhci a common practice for eMMC boards?
The eMMC module on R3S is optional and users may get boards without it.
>
> > + };
> > +
> > + chosen: chosen {
> > + stdout-path = "serial2:1500000n8";
> > + };
> > +
> > + gpio-keys {
> > + compatible = "gpio-keys";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&reset_button_pin>;
> > +
> > + button-reset {
> > + label = "reset";
> > + gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_LOW>;
> > + linux,code = <KEY_RESTART>;
> > + debounce-interval = <50>;
> > + };
> > + };
> > +
> > + gpio-leds {
> > + compatible = "gpio-leds";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&power_led_pin>, <&lan_led_pin>, <&wan_led_pin>;
> > +
> > + power_led: led-0 {
> > + color = <LED_COLOR_ID_RED>;
> > + function = LED_FUNCTION_POWER;
> > + gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
> > + default-state = "on";
> > + };
> > +
> > + lan_led: led-1 {
> > + color = <LED_COLOR_ID_GREEN>;
> > + function = LED_FUNCTION_LAN;
> > + gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
> > + };
> > +
> > + wan_led: led-2 {
> > + color = <LED_COLOR_ID_GREEN>;
> > + function = LED_FUNCTION_WAN;
> > + gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
> > + };
> > + };
> > +
> > + vdd_usbc: vdd-usbc-regulator {
> > + compatible = "regulator-fixed";
> > + regulator-name = "vdd_usbc";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <5000000>;
> > + regulator-max-microvolt = <5000000>;
> > + };
> > +
> > + vcc5v0_sys: vcc5v0-sys-regulator {
>
> This and other fixed regulators does not match the recommended naming
> pattern: ^regulator-(.*)$, please rename fixed regulator nodes.
Soory I missed the dt-binding update, also thanks Heiko for renaming the
regulator nodes.
>
> > + compatible = "regulator-fixed";
> > + regulator-name = "vcc5v0_sys";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <5000000>;
> > + regulator-max-microvolt = <5000000>;
> > + vin-supply = <&vdd_usbc>;
> > + };
> > +
> > + vcc3v3_sys: vcc3v3-sys-regulator {
> > + compatible = "regulator-fixed";
> > + regulator-name = "vcc3v3_sys";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <3300000>;
> > + regulator-max-microvolt = <3300000>;
> > + vin-supply = <&vcc5v0_sys>;
> > + };
> > +
> > + vcc5v0_usb: vcc5v0_usb-regulator {
> > + compatible = "regulator-fixed";
> > + enable-active-high;
> > + gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&vcc5v0_usb_host_en>;
> > + regulator-name = "vcc5v0_usb";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <5000000>;
> > + regulator-max-microvolt = <5000000>;
> > + vin-supply = <&vcc5v0_sys>;
> > + };
> > +};
> > +
> > +&combphy1 {
> > + status = "okay";
> > +};
> > +
> > +&combphy2 {
> > + status = "okay";
> > +};
> > +
> > +&cpu0 {
> > + cpu-supply = <&vdd_cpu>;
> > +};
> > +
> > +&cpu1 {
> > + cpu-supply = <&vdd_cpu>;
> > +};
> > +
> > +&cpu2 {
> > + cpu-supply = <&vdd_cpu>;
> > +};
> > +
> > +&cpu3 {
> > + cpu-supply = <&vdd_cpu>;
> > +};
> > +
> > +&gmac1 {
> > + assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
> > + assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>;
> > + assigned-clock-rates = <0>, <125000000>;
> > + clock_in_out = "output";
> > + phy-mode = "rgmii-id";
> > + phy-handle = <&rgmii_phy1>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&gmac1m0_miim
> > + &gmac1m0_tx_bus2_level3
> > + &gmac1m0_rx_bus2
> > + &gmac1m0_rgmii_clk_level2
> > + &gmac1m0_rgmii_bus_level3>;
> > + snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
> > + snps,reset-active-low;
> > + /* Reset time is 20ms, 100ms for rtl8211f */
> > + snps,reset-delays-us = <0 20000 100000>;
>
> These snps,reset props is deprecated, please add reset props to the
> Ethernet PHY node.
Will fix it in new patch.
>
> > + status = "okay";
> > +};
> > +
> > +&gpu {
> > + mali-supply = <&vdd_gpu>;
> > + status = "okay";
> > +};
> > +
> > +&i2c0 {
> > + status = "okay";
> > +
> > + vdd_cpu: regulator@1c {
> > + compatible = "tcs,tcs4525";
> > + reg = <0x1c>;
> > + fcs,suspend-voltage-selector = <1>;
> > + regulator-name = "vdd_cpu";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <800000>;
> > + regulator-max-microvolt = <1150000>;
> > + regulator-ramp-delay = <2300>;
> > + vin-supply = <&vcc5v0_sys>;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +
> > + rk809: pmic@20 {
> > + compatible = "rockchip,rk809";
> > + reg = <0x20>;
> > + interrupt-parent = <&gpio0>;
> > + interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
> > + #clock-cells = <1>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pmic_int>;
> > + system-power-controller;
> > + vcc1-supply = <&vcc3v3_sys>;
> > + vcc2-supply = <&vcc3v3_sys>;
> > + vcc3-supply = <&vcc3v3_sys>;
> > + vcc4-supply = <&vcc3v3_sys>;
> > + vcc5-supply = <&vcc3v3_sys>;
> > + vcc6-supply = <&vcc3v3_sys>;
> > + vcc7-supply = <&vcc3v3_sys>;
> > + vcc8-supply = <&vcc3v3_sys>;
> > + vcc9-supply = <&vcc3v3_sys>;
> > + wakeup-source;
> > +
> > + regulators {
> > + vdd_logic: DCDC_REG1 {
> > + regulator-name = "vdd_logic";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-initial-mode = <0x2>;
> > + regulator-min-microvolt = <500000>;
> > + regulator-max-microvolt = <1350000>;
> > + regulator-ramp-delay = <6001>;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +
> > + vdd_gpu: DCDC_REG2 {
> > + regulator-name = "vdd_gpu";
> > + regulator-always-on;
> > + regulator-initial-mode = <0x2>;
> > + regulator-min-microvolt = <500000>;
> > + regulator-max-microvolt = <1350000>;
> > + regulator-ramp-delay = <6001>;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +
> > + vcc_ddr: DCDC_REG3 {
> > + regulator-name = "vcc_ddr";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-initial-mode = <0x2>;
> > +
> > + regulator-state-mem {
> > + regulator-on-in-suspend;
> > + };
> > + };
> > +
> > + vdd_npu: DCDC_REG4 {
> > + regulator-name = "vdd_npu";
> > + regulator-initial-mode = <0x2>;
> > + regulator-min-microvolt = <500000>;
> > + regulator-max-microvolt = <1350000>;
> > + regulator-ramp-delay = <6001>;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +
> > + vcc_1v8: DCDC_REG5 {
> > + regulator-name = "vcc_1v8";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <1800000>;
> > + regulator-max-microvolt = <1800000>;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +
> > + vdda0v9_image: LDO_REG1 {
> > + regulator-name = "vdda0v9_image";
> > + regulator-min-microvolt = <950000>;
> > + regulator-max-microvolt = <950000>;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +
> > + vdda_0v9: LDO_REG2 {
> > + regulator-name = "vdda_0v9";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <900000>;
> > + regulator-max-microvolt = <900000>;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +
> > + vdda0v9_pmu: LDO_REG3 {
> > + regulator-name = "vdda0v9_pmu";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <900000>;
> > + regulator-max-microvolt = <900000>;
> > +
> > + regulator-state-mem {
> > + regulator-on-in-suspend;
> > + regulator-suspend-microvolt = <900000>;
> > + };
> > + };
> > +
> > + vccio_acodec: LDO_REG4 {
> > + regulator-name = "vccio_acodec";
> > + regulator-min-microvolt = <3300000>;
> > + regulator-max-microvolt = <3300000>;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +
> > + vccio_sd: LDO_REG5 {
> > + regulator-name = "vccio_sd";
> > + regulator-min-microvolt = <1800000>;
> > + regulator-max-microvolt = <3300000>;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +
> > + vcc3v3_pmu: LDO_REG6 {
> > + regulator-name = "vcc3v3_pmu";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <3300000>;
> > + regulator-max-microvolt = <3300000>;
> > +
> > + regulator-state-mem {
> > + regulator-on-in-suspend;
> > + regulator-suspend-microvolt = <3300000>;
> > + };
> > + };
> > +
> > + vcca_1v8: LDO_REG7 {
> > + regulator-name = "vcca_1v8";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <1800000>;
> > + regulator-max-microvolt = <1800000>;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +
> > + vcca1v8_pmu: LDO_REG8 {
> > + regulator-name = "vcca1v8_pmu";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <1800000>;
> > + regulator-max-microvolt = <1800000>;
> > +
> > + regulator-state-mem {
> > + regulator-on-in-suspend;
> > + regulator-suspend-microvolt = <1800000>;
> > + };
> > + };
> > +
> > + vcca1v8_image: LDO_REG9 {
> > + regulator-name = "vcca1v8_image";
> > + regulator-min-microvolt = <1800000>;
> > + regulator-max-microvolt = <1800000>;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +
> > + vcc_3v3: SWITCH_REG1 {
> > + regulator-name = "vcc_3v3";
> > + regulator-always-on;
> > + regulator-boot-on;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > +
> > + vcc3v3_sd: SWITCH_REG2 {
> > + regulator-name = "vcc3v3_sd";
> > + regulator-always-on;
> > + regulator-boot-on;
> > +
> > + regulator-state-mem {
> > + regulator-off-in-suspend;
> > + };
> > + };
> > + };
> > + };
> > +};
> > +
> > +&i2c1 {
> > + status = "okay";
> > +
> > + hym8563: rtc@51 {
> > + compatible = "haoyu,hym8563";
> > + reg = <0x51>;
> > + #clock-cells = <0>;
> > + clock-output-names = "hym8563";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&hym8563_int>;
> > + interrupt-parent = <&gpio0>;
> > + interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
> > + wakeup-source;
> > + };
> > +};
> > +
> > +&mdio1 {
> > + rgmii_phy1: ethernet-phy@1 {
> > + compatible = "ethernet-phy-ieee802.3-c22";
> > + reg = <1>;
> > + interrupt-parent = <&gpio4>;
> > + interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <ð_phy_reset_pin>;
>
> Please add the reset props here.
>
> > + };
> > +};
> > +
> > +&pcie2x1 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pcie_reset_h>;
> > + reset-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
> > + status = "okay";
> > +};
> > +
> > +&pinctrl {
> > + gpio-leds {
> > + lan_led_pin: lan-led-pin {
> > + rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
> > + };
> > +
> > + power_led_pin: power-led-pin {
> > + rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
> > + };
> > +
> > + wan_led_pin: wan-led-pin {
> > + rockchip,pins = <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
> > + };
> > + };
> > +
> > + gmac {
> > + eth_phy_reset_pin: eth-phy-reset-pin {
> > + rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
> > + };
> > + };
> > +
> > + pcie {
> > + pcie_reset_h: pcie-reset-h {
> > + rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
> > + };
> > + };
> > +
> > + pmic {
> > + pmic_int: pmic-int {
> > + rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
> > + };
> > + };
> > +
> > + rockchip-key {
> > + reset_button_pin: reset-button-pin {
> > + rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
> > + };
> > + };
> > +
> > + rtc {
> > + hym8563_int: hym8563-int {
> > + rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
> > + };
> > + };
> > +
> > + usb {
> > + vcc5v0_usb_host_en: vcc5v0-usb-host-en {
> > + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
> > + };
> > + };
> > +};
> > +
> > +&pmu_io_domains {
> > + status = "okay";
>
> The status prop is typically the last prop.
Will fix it in new patch.
>
> > + pmuio1-supply = <&vcc3v3_pmu>;
> > + pmuio2-supply = <&vcc3v3_pmu>;
> > + vccio1-supply = <&vccio_acodec>;
> > + vccio2-supply = <&vcc_1v8>;
> > + vccio3-supply = <&vccio_sd>;
> > + vccio4-supply = <&vcc_3v3>;
> > + vccio5-supply = <&vcc_1v8>;
> > + vccio6-supply = <&vcc_3v3>;
> > + vccio7-supply = <&vcc_3v3>;
> > +};
> > +
> > +&sdhci {
> > + bus-width = <8>;
> > + max-frequency = <200000000>;
> > + non-removable;
>
> Please add the hs200 prop here, or we will need to add is in U-Boot to
> be able to boot from eMMC.
Thanks for the hint, will fix it in new patch.
Thanks,
Tianling.
>
> Regards,
> Jonas
>
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
> > + status = "okay";
> > +};
> > +
> > +&sdmmc0 {
> > + bus-width = <4>;
> > + cap-mmc-highspeed;
> > + cap-sd-highspeed;
> > + disable-wp;
> > + no-sdio;
> > + no-mmc;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
> > + sd-uhs-sdr50;
> > + vmmc-supply = <&vcc3v3_sd>;
> > + vqmmc-supply = <&vccio_sd>;
> > + status = "okay";
> > +};
> > +
> > +&tsadc {
> > + status = "okay";
> > +};
> > +
> > +&uart2 {
> > + status = "okay";
> > +};
> > +
> > +&usb2phy0 {
> > + status = "okay";
> > +};
> > +
> > +&usb2phy0_host {
> > + phy-supply = <&vcc5v0_usb>;
> > + status = "okay";
> > +};
> > +
> > +&usb2phy0_otg {
> > + status = "okay";
> > +};
> > +
> > +&usb_host0_xhci {
> > + extcon = <&usb2phy0>;
> > + status = "okay";
> > +};
> > +
> > +&usb_host1_xhci {
> > + status = "okay";
> > +};
> > +
> > +&vop {
> > + assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
> > + assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
> > + status = "okay";
> > +};
> > +
> > +&vop_mmu {
> > + status = "okay";
> > +};
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board
2024-10-22 17:38 ` Tianling Shen
@ 2024-10-22 17:56 ` Jonas Karlman
2024-10-22 18:18 ` Tianling Shen
0 siblings, 1 reply; 11+ messages in thread
From: Jonas Karlman @ 2024-10-22 17:56 UTC (permalink / raw)
To: Tianling Shen
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Chris Morgan, Andy Yan, Jagan Teki, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hi Tianling,
On 2024-10-22 19:38, Tianling Shen wrote:
> Hi Jonas,
>
> On Wed, Oct 23, 2024 at 12:49 AM Jonas Karlman <jonas@kwiboo.se> wrote:
>>
>> Hi Tianling,
>>
>> On 2024-10-20 19:39, Tianling Shen wrote:
>>> The NanoPi R3S(as "R3S") is an open source platform with dual-Gbps
>>> Ethernet ports designed and developed by FriendlyElec for IoT
>>> applications.
>>>
>>> Specification:
>>> - Rockchip RK3566
>>> - 2GB LPDDR4X RAM
>>> - optional 32GB eMMC module
>>> - SD card slot
>>> - 2x 1000 Base-T
>>> - 3x LEDs (POWER, LAN, WAN)
>>> - 2x Buttons (Reset, MaskROM)
>>> - 1x USB 3.0 Port
>>> - Type-C 5V 2A Power
>>>
>>> Signed-off-by: Tianling Shen <cnsztl@gmail.com>
>>> ---
>>>  arch/arm64/boot/dts/rockchip/Makefile     |  1 +
>>>  .../boot/dts/rockchip/rk3566-nanopi-r3s.dts  | 554 ++++++++++++++++++
>>> Â 2 files changed, 555 insertions(+)
>>> Â create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
>>>
>>> diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
>>> index 8e1025cb5d20..e641033d23d1 100644
>>> --- a/arch/arm64/boot/dts/rockchip/Makefile
>>> +++ b/arch/arm64/boot/dts/rockchip/Makefile
>>> @@ -109,6 +109,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-model-a.dtb
>>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-box-demo.dtb
>>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lckfb-tspi.dtb
>>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lubancat-1.dtb
>>> +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-nanopi-r3s.dtb
>>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
>>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
>>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb
>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
>>> new file mode 100644
>>> index 000000000000..951dd9bcb4b0
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
>>> @@ -0,0 +1,554 @@
>>> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
>>> +/*
>>> + * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
>>> + *
>>> + * Copyright (c) 2024 FriendlyElec Computer Tech. Co., Ltd.
>>> + * (http://www.friendlyarm.com/
This could probably be updated to use https://www.friendlyelec.com/
>>> + *
>>> + * Copyright (c) 2024 Tianling Shen <cnsztl@gmail.com>
>>> + */
>>> +
>>> +/dts-v1/;
>>> +#include <dt-bindings/gpio/gpio.h>
>>> +#include <dt-bindings/input/input.h>
>>> +#include <dt-bindings/leds/common.h>
>>> +#include <dt-bindings/pinctrl/rockchip.h>
>>> +#include <dt-bindings/soc/rockchip,vop2.h>
>>> +#include "rk3566.dtsi"
>>> +
>>> +/ {
>>> + Â Â model = "FriendlyARM NanoPi R3S";
>>
>> Please use the marketing name, and the name added in binding:
>>
>> Â Â FriendlyElec NanoPi R3S
>
> Sorry for the copy & paste error, will fix it in new patch.
The commit subject could probably also be updated :-)
>
>>
>>> + Â Â compatible = "friendlyarm,nanopi-r3s", "rockchip,rk3566";
>>> +
>>> + Â Â aliases {
>>> + Â Â Â Â Â Â ethernet0 = &gmac1;
>>> + Â Â Â Â Â Â mmc0 = &sdmmc0;
>>> + Â Â Â Â Â Â mmc1 = &sdhci;
>>
>> This board comes with on-board eMMC this please use mmc0 as alias for
>> &sdhci; and mmc1 for sd-card.
>
> Is using mmc0 for sdhci a common practice for eMMC boards?
> The eMMC module on R3S is optional and users may get boards without it.
Typically any non-removable storage (emmc) is listed before removable
storage (sd-card) options. Also U-Boot will try to override and use
mmc0=sdhci and mmc1=sdmmc0 for all rk356x boards, so for EFI booing
using control FDT the alias may be different.
Regards,
Jonas
[snip]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board
2024-10-22 17:56 ` Jonas Karlman
@ 2024-10-22 18:18 ` Tianling Shen
2024-10-22 18:43 ` Jonas Karlman
0 siblings, 1 reply; 11+ messages in thread
From: Tianling Shen @ 2024-10-22 18:18 UTC (permalink / raw)
To: Jonas Karlman
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Chris Morgan, Andy Yan, Jagan Teki, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hi Jonas,
On Wed, Oct 23, 2024 at 1:56 AM Jonas Karlman <jonas@kwiboo.se> wrote:
>
> Hi Tianling,
>
> On 2024-10-22 19:38, Tianling Shen wrote:
> > Hi Jonas,
> >
> > On Wed, Oct 23, 2024 at 12:49 AM Jonas Karlman <jonas@kwiboo.se> wrote:
> >>
> >> Hi Tianling,
> >>
> >> On 2024-10-20 19:39, Tianling Shen wrote:
> >>> The NanoPi R3S(as "R3S") is an open source platform with dual-Gbps
> >>> Ethernet ports designed and developed by FriendlyElec for IoT
> >>> applications.
> >>>
> >>> Specification:
> >>> - Rockchip RK3566
> >>> - 2GB LPDDR4X RAM
> >>> - optional 32GB eMMC module
> >>> - SD card slot
> >>> - 2x 1000 Base-T
> >>> - 3x LEDs (POWER, LAN, WAN)
> >>> - 2x Buttons (Reset, MaskROM)
> >>> - 1x USB 3.0 Port
> >>> - Type-C 5V 2A Power
> >>>
> >>> Signed-off-by: Tianling Shen <cnsztl@gmail.com>
> >>> ---
> >>>  arch/arm64/boot/dts/rockchip/Makefile     |  1 +
> >>>  .../boot/dts/rockchip/rk3566-nanopi-r3s.dts  | 554 ++++++++++++++++++
> >>> Â 2 files changed, 555 insertions(+)
> >>> Â create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
> >>>
> >>> diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
> >>> index 8e1025cb5d20..e641033d23d1 100644
> >>> --- a/arch/arm64/boot/dts/rockchip/Makefile
> >>> +++ b/arch/arm64/boot/dts/rockchip/Makefile
> >>> @@ -109,6 +109,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-model-a.dtb
> >>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-box-demo.dtb
> >>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lckfb-tspi.dtb
> >>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lubancat-1.dtb
> >>> +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-nanopi-r3s.dtb
> >>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
> >>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
> >>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb
> >>> diff --git a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
> >>> new file mode 100644
> >>> index 000000000000..951dd9bcb4b0
> >>> --- /dev/null
> >>> +++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
> >>> @@ -0,0 +1,554 @@
> >>> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> >>> +/*
> >>> + * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
> >>> + *
> >>> + * Copyright (c) 2024 FriendlyElec Computer Tech. Co., Ltd.
> >>> + * (http://www.friendlyarm.com/
>
> This could probably be updated to use https://www.friendlyelec.com/
Yes!
>
> >>> + *
> >>> + * Copyright (c) 2024 Tianling Shen <cnsztl@gmail.com>
> >>> + */
> >>> +
> >>> +/dts-v1/;
> >>> +#include <dt-bindings/gpio/gpio.h>
> >>> +#include <dt-bindings/input/input.h>
> >>> +#include <dt-bindings/leds/common.h>
> >>> +#include <dt-bindings/pinctrl/rockchip.h>
> >>> +#include <dt-bindings/soc/rockchip,vop2.h>
> >>> +#include "rk3566.dtsi"
> >>> +
> >>> +/ {
> >>> + Â Â model = "FriendlyARM NanoPi R3S";
> >>
> >> Please use the marketing name, and the name added in binding:
> >>
> >> Â Â FriendlyElec NanoPi R3S
> >
> > Sorry for the copy & paste error, will fix it in new patch.
>
> The commit subject could probably also be updated :-)
>
> >
> >>
> >>> + Â Â compatible = "friendlyarm,nanopi-r3s", "rockchip,rk3566";
> >>> +
> >>> + Â Â aliases {
> >>> + Â Â Â Â Â Â ethernet0 = &gmac1;
> >>> + Â Â Â Â Â Â mmc0 = &sdmmc0;
> >>> + Â Â Â Â Â Â mmc1 = &sdhci;
> >>
> >> This board comes with on-board eMMC this please use mmc0 as alias for
> >> &sdhci; and mmc1 for sd-card.
> >
> > Is using mmc0 for sdhci a common practice for eMMC boards?
> > The eMMC module on R3S is optional and users may get boards without it.
>
> Typically any non-removable storage (emmc) is listed before removable
> storage (sd-card) options. Also U-Boot will try to override and use
> mmc0=sdhci and mmc1=sdmmc0 for all rk356x boards, so for EFI booing
> using control FDT the alias may be different.
>
Thank you for the details! May I have your Suggested-by tag for all
of these fixes?
Thanks,
Tianling.
> Regards,
> Jonas
>
> [snip]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board
2024-10-22 18:18 ` Tianling Shen
@ 2024-10-22 18:43 ` Jonas Karlman
0 siblings, 0 replies; 11+ messages in thread
From: Jonas Karlman @ 2024-10-22 18:43 UTC (permalink / raw)
To: Tianling Shen
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Chris Morgan, Andy Yan, Jagan Teki, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hi Tianling,
On 2024-10-22 20:18, Tianling Shen wrote:
> Hi Jonas,
>
> On Wed, Oct 23, 2024 at 1:56 AM Jonas Karlman <jonas@kwiboo.se> wrote:
>>
>> Hi Tianling,
>>
>> On 2024-10-22 19:38, Tianling Shen wrote:
>>> Hi Jonas,
>>>
>>> On Wed, Oct 23, 2024 at 12:49 AM Jonas Karlman <jonas@kwiboo.se> wrote:
>>>>
>>>> Hi Tianling,
>>>>
>>>> On 2024-10-20 19:39, Tianling Shen wrote:
>>>>> The NanoPi R3S(as "R3S") is an open source platform with dual-Gbps
>>>>> Ethernet ports designed and developed by FriendlyElec for IoT
>>>>> applications.
>>>>>
>>>>> Specification:
>>>>> - Rockchip RK3566
>>>>> - 2GB LPDDR4X RAM
>>>>> - optional 32GB eMMC module
>>>>> - SD card slot
>>>>> - 2x 1000 Base-T
>>>>> - 3x LEDs (POWER, LAN, WAN)
>>>>> - 2x Buttons (Reset, MaskROM)
>>>>> - 1x USB 3.0 Port
>>>>> - Type-C 5V 2A Power
>>>>>
>>>>> Signed-off-by: Tianling Shen <cnsztl@gmail.com>
>>>>> ---
>>>>>  arch/arm64/boot/dts/rockchip/Makefile     |  1 +
>>>>>  .../boot/dts/rockchip/rk3566-nanopi-r3s.dts  | 554 ++++++++++++++++++
>>>>> Â 2 files changed, 555 insertions(+)
>>>>> Â create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
>>>>> index 8e1025cb5d20..e641033d23d1 100644
>>>>> --- a/arch/arm64/boot/dts/rockchip/Makefile
>>>>> +++ b/arch/arm64/boot/dts/rockchip/Makefile
>>>>> @@ -109,6 +109,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-model-a.dtb
>>>>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-box-demo.dtb
>>>>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lckfb-tspi.dtb
>>>>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lubancat-1.dtb
>>>>> +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-nanopi-r3s.dtb
>>>>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
>>>>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
>>>>> Â dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb
>>>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
>>>>> new file mode 100644
>>>>> index 000000000000..951dd9bcb4b0
>>>>> --- /dev/null
>>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
>>>>> @@ -0,0 +1,554 @@
>>>>> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
>>>>> +/*
>>>>> + * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
>>>>> + *
>>>>> + * Copyright (c) 2024 FriendlyElec Computer Tech. Co., Ltd.
>>>>> + * (http://www.friendlyarm.com/
>>
>> This could probably be updated to use https://www.friendlyelec.com/
>
> Yes!
>
>>
>>>>> + *
>>>>> + * Copyright (c) 2024 Tianling Shen <cnsztl@gmail.com>
>>>>> + */
>>>>> +
>>>>> +/dts-v1/;
>>>>> +#include <dt-bindings/gpio/gpio.h>
>>>>> +#include <dt-bindings/input/input.h>
>>>>> +#include <dt-bindings/leds/common.h>
>>>>> +#include <dt-bindings/pinctrl/rockchip.h>
>>>>> +#include <dt-bindings/soc/rockchip,vop2.h>
>>>>> +#include "rk3566.dtsi"
>>>>> +
>>>>> +/ {
>>>>> + Â Â model = "FriendlyARM NanoPi R3S";
>>>>
>>>> Please use the marketing name, and the name added in binding:
>>>>
>>>> Â Â FriendlyElec NanoPi R3S
>>>
>>> Sorry for the copy & paste error, will fix it in new patch.
>>
>> The commit subject could probably also be updated :-)
>>
>>>
>>>>
>>>>> + Â Â compatible = "friendlyarm,nanopi-r3s", "rockchip,rk3566";
>>>>> +
>>>>> + Â Â aliases {
>>>>> + Â Â Â Â Â Â ethernet0 = &gmac1;
>>>>> + Â Â Â Â Â Â mmc0 = &sdmmc0;
>>>>> + Â Â Â Â Â Â mmc1 = &sdhci;
>>>>
>>>> This board comes with on-board eMMC this please use mmc0 as alias for
>>>> &sdhci; and mmc1 for sd-card.
>>>
>>> Is using mmc0 for sdhci a common practice for eMMC boards?
>>> The eMMC module on R3S is optional and users may get boards without it.
>>
>> Typically any non-removable storage (emmc) is listed before removable
>> storage (sd-card) options. Also U-Boot will try to override and use
>> mmc0=sdhci and mmc1=sdmmc0 for all rk356x boards, so for EFI booing
>> using control FDT the alias may be different.
>>
>
> Thank you for the details! May I have your Suggested-by tag for all
> of these fixes?
Sure,
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Regards,
Jonas
>
> Thanks,
> Tianling.
>
>> Regards,
>> Jonas
>>
>> [snip]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S
2024-10-22 17:07 ` Jonas Karlman
@ 2024-10-22 20:34 ` Heiko Stübner
0 siblings, 0 replies; 11+ messages in thread
From: Heiko Stübner @ 2024-10-22 20:34 UTC (permalink / raw)
To: Tianling Shen, Jonas Karlman
Cc: Jagan Teki, Rob Herring, Andy Yan, Krzysztof Kozlowski,
Chris Morgan, Conor Dooley, linux-kernel, linux-arm-kernel,
devicetree, linux-rockchip
Am Dienstag, 22. Oktober 2024, 19:07:43 CEST schrieb Jonas Karlman:
> Hi Heiko,
>
> On 2024-10-22 16:12, Heiko Stuebner wrote:
> > On Mon, 21 Oct 2024 01:39:45 +0800, Tianling Shen wrote:
> >> Add devicetree binding for FriendlyARM NanoPi R3S.
> >>
> >>
> >
> > Applied, thanks!
> >
> > [1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S
> > commit: 1e94bfea52bee081c42ab922c19156dd3d2bade8
> > [2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board
> > commit: 50decd493c8394c52d04561fe4ede34df27a46ba
>
> I just sent out a review on this patch [1], please leave more then a day
> or two to finish up a review ;-)
Hehe, yeah might be better ... somehow that small board dts looked so
innocent though - aka what could go wrong ;-) ... obviously something.
> [1] https://lore.kernel.org/r/13bb8657-f048-4f79-a2c1-3680445f2bef@kwiboo.se/
>
> Regards,
> Jonas
>
> >
> > Best regards,
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-10-22 20:36 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-20 17:39 [PATCH 1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S Tianling Shen
2024-10-20 17:39 ` [PATCH 2/2] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board Tianling Shen
2024-10-22 16:49 ` Jonas Karlman
2024-10-22 17:38 ` Tianling Shen
2024-10-22 17:56 ` Jonas Karlman
2024-10-22 18:18 ` Tianling Shen
2024-10-22 18:43 ` Jonas Karlman
2024-10-21 11:47 ` [PATCH 1/2] dt-bindings: arm: rockchip: Add FriendlyARM NanoPi R3S Conor Dooley
2024-10-22 14:12 ` Heiko Stuebner
2024-10-22 17:07 ` Jonas Karlman
2024-10-22 20:34 ` Heiko Stübner
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).