arm64: rockchip: rk3328: Add Radxa ROCK Pi E
Subsystems (2)
cover arm64: rockchip: rk3328: Add Radxa ROCK Pi E
From: Chen-Yu Tsai <[email protected]>
Hi everyone,
This series adds support for the Radxa ROCK Pi E. This is a router oriented SBC based on Rockchip's RK3328 SoC. As the official wiki page puts it, "E for Ethernets".
It features the RK3328 SoC, gigabit and fast Ethernet RJ45 ports, both directly served by Ethernet controllers in the SoC, a USB 3.0 host port, a power-only USB type-C port, a 3.5mm headphone jack for audio output, two LEDs, a 40-pin Raspberry Pi style GPIO header, and optional WiFi+BT and PoE header.
The board comes in multiple configurations, differing in the amount of onboard RAM, the level of WiFi+BT (none, 802.11n 2.4GHz, or 802.11ac 2.4 GHz & 5 GHz), and whether PoE is supported or not. These variants can all share the same device tree. Currently, the 802.11ac chip lacks an in-kernel driver.
The USB 2.0 OTG controller is available on the 40-pin header. This is not enabled in the device tree, since it is possible to use it in a host-only configuration, or in OTG mode with an extra pin from the header as the ID pin.
The device tree is based on the one of the Rock64, with various parts modified to match the ROCK Pi E, and some parts updated to newer styles, such as the gmac2io node's mdio sub-node.
Patch 1 adds the clock_in_out property to the gmac2phy node. This would always have the same setting for gmac2phy, which uses an integrated PHY in RMII mode. Having this set by default makes enabling gmac2phy at the board level simpler.
Patch 2 adds a compatible string for this board to the list of Rockchip based devices.
Patch 3 adds a device tree file for this board. This is based on the one for the Rock64, with many modifications to adapt it to the new board, as well as style updates.
Please have a look.
Regards
ChenYu
Chen-Yu Tsai (3):
arm64: dts: rockchip: rk3328: Add clock_in_out property to gmac2phy
node
dt-bindings: arm: rockchip: Add Radxa ROCK Pi E
arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E
.../devicetree/bindings/arm/rockchip.yaml | 5 + arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3328-rock-pi-e.dts | 369 ++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3328.dtsi | 1 + 4 files changed, 376 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
Signature · 7 lines
2.29.2 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH 1/3 arm64: dts: rockchip: rk3328: Add clock_in_out property to gmac2phy node
From: Chen-Yu Tsai <[email protected]>
The gmac2phy is integrated with the PHY within the SoC. Any properties related to this integration can be included in the .dtsi file, instead of having board dts files specify them separately.
Add the clock_in_out property to specify the direction of the PHY clock. This is the minimum required to have gmac2phy working on Linux. Other examples include assigned-clocks, assigned-clock-rates, and assigned-clock-parents properties, but the hardware default plus the implementation requesting the appropriate clock rate also works.
--- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +1 -0
@@ -928,6 +928,7 @@ gmac2phy: ethernet@ff550000 { phy-mode = "rmii"; phy-handle = <&phy>; snps,txpbl = <0x4>; + clock_in_out = "output"; status = "disabled"; mdio {
Signature · 7 lines
2.29.2 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH 2/3 dt-bindings: arm: rockchip: Add Radxa ROCK Pi E
In reply to Chen-Yu TsaiFrom: Chen-Yu Tsai <[email protected]>
Radxa ROCK Pi E is a router oriented SBC based on Rockchip's RK3328 SoC. As the official wiki page puts it, "E for Ethernets".
It features the RK3328 SoC, gigabit and fast Ethernet RJ45 ports, both directly served by Ethernet controllers in the SoC, a USB 3.0 host port, a power-only USB type-C port, a 3.5mm headphone jack for audio output, two LEDs, a 40-pin Raspberry Pi style GPIO header, and optional WiFi+BT and PoE header.
The board comes in multiple configurations, differing in the amount of onboard RAM, the level of WiFi+BT (none, 802.11n 2.4GHz, or 802.11ac 2.4 GHz & 5 GHz), and whether PoE is supported or not. These variants can all share the same device tree.
The USB 2.0 OTG controller is available on the 40-pin header. This is not enabled in the device tree, since it is possible to use it in a host-only configuration, or in OTG mode with an extra pin from the header as the ID pin.
The device tree is based on the one of the Rock64, with various parts modified to match the ROCK Pi E, and some parts updated to newer styles, such as the gmac2io node's mdio sub-node.
Add a compatible string for the new board.
--- Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +5 -0
@@ -468,6 +468,11 @@ properties: - const: radxa,rockpi4 - const: rockchip,rk3399 + - description: Radxa ROCK Pi E + items: + - const: radxa,rockpi-e + - const: rockchip,rk3328 + - description: Radxa ROCK Pi N8 items: - const: radxa,rockpi-n8
Signature · 7 lines
2.29.2 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Re: [PATCH 2/3] dt-bindings: arm: rockchip: Add Radxa ROCK Pi E
Quoted 25 lines · Chen-Yu Tsai
From: Chen-Yu Tsai <[email protected]>
Radxa ROCK Pi E is a router oriented SBC based on Rockchip's RK3328 SoC. As the official wiki page puts it, "E for Ethernets".
It features the RK3328 SoC, gigabit and fast Ethernet RJ45 ports, both directly served by Ethernet controllers in the SoC, a USB 3.0 host port, a power-only USB type-C port, a 3.5mm headphone jack for audio output, two LEDs, a 40-pin Raspberry Pi style GPIO header, and optional WiFi+BT and PoE header.
The board comes in multiple configurations, differing in the amount of onboard RAM, the level of WiFi+BT (none, 802.11n 2.4GHz, or 802.11ac 2.4 GHz & 5 GHz), and whether PoE is supported or not. These variants can all share the same device tree.
The USB 2.0 OTG controller is available on the 40-pin header. This is not enabled in the device tree, since it is possible to use it in a host-only configuration, or in OTG mode with an extra pin from the header as the ID pin.
The device tree is based on the one of the Rock64, with various parts modified to match the ROCK Pi E, and some parts updated to newer styles, such as the gmac2io node's mdio sub-node.
Quoted 7 lines
Add a compatible string for the new board.
Signed-off-by Chen-Yu Tsai <[email protected]>--- Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ 1 file changed, 5 insertions(+)
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH 3/3 arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E
In reply to Chen-Yu TsaiFrom: Chen-Yu Tsai <[email protected]>
Radxa ROCK Pi E is a router oriented SBC based on Rockchip's RK3328 SoC. As the official wiki page puts it, "E for Ethernets".
It features the RK3328 SoC, gigabit and fast Ethernet RJ45 ports, both directly served by Ethernet controllers in the SoC, a USB 3.0 host port, a power-only USB type-C port, a 3.5mm headphone jack for audio output, two LEDs, a 40-pin Raspberry Pi style GPIO header, and optional WiFi+BT and PoE header.
The board comes in multiple configurations, differing in the amount of onboard RAM, the level of WiFi+BT (none, 802.11n 2.4GHz, or 802.11ac 2.4 GHz & 5 GHz), and whether PoE is supported or not. These variants can all share the same device tree.
The USB 2.0 OTG controller is available on the 40-pin header. This is not enabled in the device tree, since it is possible to use it in a host-only configuration, or in OTG mode with an extra pin from the header as the ID pin.
The device tree is based on the one of the Rock64, with various parts modified to match the ROCK Pi E, and some parts updated to newer styles, such as the gmac2io node's mdio sub-node.
Add a new device tree file for the new board.
--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3328-rock-pi-e.dts | 369 ++++++++++++++++++ 2 files changed, 370 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -11,6 +11,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox.dtb
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +369 -0
369 lines not on this page · raw message
Signature · 7 lines
2.29.2 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Re: [PATCH 3/3] arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E
Hi Chen-Yu,
Some comments, have a look if it is useful...
Quoted 82 lines · Chen-Yu Tsai
From: Chen-Yu Tsai <[email protected]>
Radxa ROCK Pi E is a router oriented SBC based on Rockchip's RK3328 SoC. As the official wiki page puts it, "E for Ethernets".
It features the RK3328 SoC, gigabit and fast Ethernet RJ45 ports, both directly served by Ethernet controllers in the SoC, a USB 3.0 host port, a power-only USB type-C port, a 3.5mm headphone jack for audio output,
two LEDs, a 40-pin Raspberry Pi style GPIO header, and optional WiFi+BT and PoE header.
The board comes in multiple configurations, differing in the amount of onboard RAM, the level of WiFi+BT (none, 802.11n 2.4GHz, or 802.11ac 2.4 GHz & 5 GHz), and whether PoE is supported or not. These variants can all share the same device tree.
The USB 2.0 OTG controller is available on the 40-pin header. This is not enabled in the device tree, since it is possible to use it in a host-only configuration, or in OTG mode with an extra pin from the header as the ID pin.
The device tree is based on the one of the Rock64, with various parts modified to match the ROCK Pi E, and some parts updated to newer styles, such as the gmac2io node's mdio sub-node.
Add a new device tree file for the new board.
Signed-off-by Chen-Yu Tsai <[email protected]>--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3328-rock-pi-e.dts | 369 ++++++++++++++++++ 2 files changed, 370 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dtsarch/arm64/boot/dts/rockchip/Makefile +1
-0@@ -11,6 +11,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox.dtbarch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +29
-0@@ -0,0 +1,369 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * (C) Copyright 2020 Chen-Yu Tsai <[email protected]> + * + * Based on ./rk3328-rock64.dts, which is + * + * Copyright (c) 2017 PINE64 + */ + +/dts-v1/; + +#include <dt-bindings/leds/common.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/pinctrl/rockchip.h> +#include "rk3328.dtsi" + +/ { + model = "Radxa ROCK Pi E"; + compatible = "radxa,rockpi-e", "rockchip,rk3328"; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + gmac_clkin: external-gmac-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "gmac_clkin"; + #clock-cells = <0>;
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 38
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ }; + + leds { + compatible = "gpio-leds"; + pinctrl-0 = <&led_pin>; + pinctrl-names = "default"; + + led-0 { + /* schematic say green but the actual thing is blue */
In rockpie-v1.2-20200427-sch.pdf this led is already called "LED_BLUE", so comment maybe not needed anymore?
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 51
Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +12
-0+ color = <LED_COLOR_ID_BLUE>; + gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + };> + }; + + vcc_sd: sdmmc-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0m1_pin>; + regulator-boot-on; + regulator-name = "vcc_sd";
regulator-name above other regulator properties
regulator voltage missing
make things as complete as possible
from fixed-regulator.yaml:
description:
Any property defined as part of the core regulator binding, defined in regulator.yaml, can also be used. However a fixed voltage regulator is expected to have the regulator-min-microvolt and regulator-max-microvolt to be the same.
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 61
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ vin-supply = <&vcc_io>; + }; + + vcc_host_5v: vcc-host-5v-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb30_host_drv>; + enable-active-high; + regulator-name = "vcc_host_5v";
idem limits
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 65
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +4
-0+ regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc_sys>; + };
For Heiko: ?? remove ??
usb3 has no support in mainline.
Regulators not in use are disabled.
For mainline this node has no use....
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 71
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +6
-0+ + vcc_sys: vcc-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc_sys"; + regulator-always-on; + regulator-boot-on;
At the other regulators this is sort below the regulator limits.
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 81
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + vcc_wifi: vcc-wifi-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_en>; + regulator-name = "vcc_wifi";
idem limits
Quoted 25 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +25
-0+ regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc_io>; + }; +}; + +&analog_sound { + status = "okay"; +}; + +&codec { + status = "okay"; +}; + +&cpu0 { + cpu-supply = <&vdd_arm>; +}; + +&cpu1 { + cpu-supply = <&vdd_arm>; +}; + +&cpu2 { + cpu-supply = <&vdd_arm>; +};
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 115
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ +&cpu3 { + cpu-supply = <&vdd_arm>; +}; + +&emmc { + bus-width = <8>; + cap-mmc-highspeed; + max-frequency = <150000000>;
remove
already defined in dtsi
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 124
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ mmc-ddr-1_8v; + mmc-hs200-1_8v; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>; + vmmc-supply = <&vcc_io>; + vqmmc-supply = <&vcc18_emmc>; + status = "okay"; +};
////////////////////////
emmc: mmc@ff520000 {
compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc";
reg = <0x0 0xff520000 0x0 0x4000>;
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
<&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
fifo-depth = <0x100>;
max-frequency = <150000000>;
status = "disabled";
};////////////////////////
Quoted 41 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +41
-0+ +&gmac2io { + assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; + assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; + clock_in_out = "input"; + phy-handle = <&rtl8211e>; + phy-mode = "rgmii"; + phy-supply = <&vcc_io>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmiim1_pins>; + snps,aal; + snps,rxpbl = <0x4>; + snps,txpbl = <0x4>; + tx_delay = <0x26>; + rx_delay = <0x11>; + status = "okay"; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + rtl8211e: ethernet-phy@1 { + reg = <1>; + pinctrl-0 = <ð_phy_int_pin>, <ð_phy_reset_pin>; + pinctrl-names = "default"; + interrupt-parent = <&gpio1>; + interrupts = <24 IRQ_TYPE_LEVEL_LOW>; + reset-assert-us = <10000>; + reset-deassert-us = <50000>; + reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gmac2phy { + pinctrl-names = "default"; + pinctrl-0 = <&fephyled_linkm1>, <&fephyled_rxm1>; + status = "okay"; +}; +
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 174
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+&i2c1 { + status = "okay"; + + rk805: pmic@18 { + compatible = "rockchip,rk805"; + reg = <0x18>; + interrupt-parent = <&gpio2>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>; + #clock-cells = <1>;
all thing that start with "#" down the list
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 177
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +3
-0+ clock-output-names = "xin32k", "rk805-clkout2"; + gpio-controller; + #gpio-cells = <2>;
idem
Quoted 114 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +114
-0+ pinctrl-names = "default"; + pinctrl-0 = <&pmic_int_l>; + rockchip,system-power-controller; + wakeup-source; + + vcc1-supply = <&vcc_sys>; + vcc2-supply = <&vcc_sys>; + vcc3-supply = <&vcc_sys>; + vcc4-supply = <&vcc_sys>; + vcc5-supply = <&vcc_io>; + vcc6-supply = <&vcc_sys>; + + regulators { + vdd_log: DCDC_REG1 { + regulator-name = "vdd_log"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1450000>; + regulator-ramp-delay = <12500>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1000000>; + }; + }; + + vdd_arm: DCDC_REG2 { + regulator-name = "vdd_arm"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1450000>; + regulator-ramp-delay = <12500>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <950000>; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-name = "vcc_ddr"; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vcc_io: DCDC_REG4 { + regulator-name = "vcc_io"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc_18: LDO_REG1 { + regulator-name = "vcc_18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcc18_emmc: LDO_REG2 { + regulator-name = "vcc18_emmc"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vdd_10: LDO_REG3 { + regulator-name = "vdd_10"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1000000>; + }; + }; + }; + }; +}; + +&i2s1 { + status = "okay"; +}; + +&io_domains { + pmuio-supply = <&vcc_io>; + vccio1-supply = <&vcc_io>; + vccio2-supply = <&vcc18_emmc>;
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 300
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ vccio3-supply = <&vcc_io>; + vccio4-supply = <&vcc_io>; + vccio5-supply = <&vcc_io>; + vccio6-supply = <&vcc_io>; + status = "okay"; +}; + +&pinctrl { + ethernet-phy {
gmac2io
phy / ethernet-phy is a reserved node name
use something else
make ARCH=arm64 dtbs_check
/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dt.yaml: ethernet-phy:
'reg' is a required property
From schema: Documentation/devicetree/bindings/net/ethernet-phy.yaml
Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +13
-0+ eth_phy_int_pin: eth-phy-int-pin { + rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_down>; + }; + + eth_phy_reset_pin: eth-phy-reset-pin { + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>; + }; + }; + + leds { + led_pin: led-pin { + rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + };
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 322
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ }; + + pmic { + pmic_int_l: pmic-int-l { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + usb3 {
usb
Last numbers in nodenames are more related to the sort order then to capabillity.
ie: mmc0, mmc1
All usb pin related things here.
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +6
-0+ usb30_host_drv: usb30-host-drv { + rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + wifi {
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 337
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ wifi_en: wifi-en { + rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&sdmmc { + bus-width = <4>; + cap-mmc-highspeed;
remove
micro SD only
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 349
Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +12
-0+ cap-sd-highspeed; + disable-wp; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>; + vmmc-supply = <&vcc_sd>; + status = "okay"; +}; + +&saradc { + vref-supply = <&vcc_18>; + status = "okay"; +};
What happened to the recovery key from the schematic?
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ +&tsadc { + status = "okay"; +}; + +&u2phy { + status = "okay"; +}; + +&u2phy_host {
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 369
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +};
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Re: [PATCH 3/3] arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E
Hi,
Quoted 97 lines · Johan Jonker
Hi Chen-Yu,
Some comments, have a look if it is useful...
Quoted 90 lines · Chen-Yu Tsai
From: Chen-Yu Tsai <[email protected]>
Radxa ROCK Pi E is a router oriented SBC based on Rockchip's RK3328 SoC. As the official wiki page puts it, "E for Ethernets".
It features the RK3328 SoC, gigabit and fast Ethernet RJ45 ports, both directly served by Ethernet controllers in the SoC, a USB 3.0 host port, a power-only USB type-C port, a 3.5mm headphone jack for audio output,
two LEDs, a 40-pin Raspberry Pi style GPIO header, and optional WiFi+BT and PoE header.
The board comes in multiple configurations, differing in the amount of onboard RAM, the level of WiFi+BT (none, 802.11n 2.4GHz, or 802.11ac 2.4 GHz & 5 GHz), and whether PoE is supported or not. These variants can all share the same device tree.
The USB 2.0 OTG controller is available on the 40-pin header. This is not enabled in the device tree, since it is possible to use it in a host-only configuration, or in OTG mode with an extra pin from the header as the ID pin.
The device tree is based on the one of the Rock64, with various parts modified to match the ROCK Pi E, and some parts updated to newer styles, such as the gmac2io node's mdio sub-node.
Add a new device tree file for the new board.
Signed-off-by Chen-Yu Tsai <[email protected]>--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3328-rock-pi-e.dts | 369 ++++++++++++++++++ 2 files changed, 370 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dtsarch/arm64/boot/dts/rockchip/Makefile +1
-0@@ -11,6 +11,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox.dtbarch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +37
-0@@ -0,0 +1,369 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * (C) Copyright 2020 Chen-Yu Tsai <[email protected]> + * + * Based on ./rk3328-rock64.dts, which is + * + * Copyright (c) 2017 PINE64 + */ + +/dts-v1/; + +#include <dt-bindings/leds/common.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/pinctrl/rockchip.h> +#include "rk3328.dtsi" + +/ { + model = "Radxa ROCK Pi E"; + compatible = "radxa,rockpi-e", "rockchip,rk3328"; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + gmac_clkin: external-gmac-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "gmac_clkin"; + #clock-cells = <0>; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-0 = <&led_pin>; + pinctrl-names = "default"; + + led-0 {
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 38
Quoted 1 line
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +1
-0+ /* schematic say green but the actual thing is blue */In rockpie-v1.2-20200427-sch.pdf this led is already called "
LED_BLUE", so comment maybe not needed anymore?
Thanks. Did not notice there was a new revision.
Quoted 11 lines
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ color = <LED_COLOR_ID_BLUE>; + gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + };> + }; + + vcc_sd: sdmmc-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0m1_pin>;
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 51
Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +2
-0+ regulator-boot-on; + regulator-name = "vcc_sd";regulator-name above other regulator properties
That is actually what I was used to, but some other rockchip dts files have all the properties sorted alphabetically. So I stuck with what I saw.
Quoted 10 lines
regulator voltage missing
make things as complete as possiblefrom
fixed-regulator.yaml:description:
Any property defined as part of the core regulator binding, defined inregulator.yaml, can also be used. However a fixed voltage regulator is expected to have the regulator-min-microvolt and regulator-max-microvolt to be the same.
However this is not a real regulator; it is merely an on/off switch. I believe in this case it should just pass through the voltage from its upstream.
Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 61
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ vin-supply = <&vcc_io>; + }; + + vcc_host_5v: vcc-host-5v-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb30_host_drv>; + enable-active-high; + regulator-name = "vcc_host_5v";
Quoted 1 line
idem limits
Same here.
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 65
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +4
-0+ regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc_sys>; + };For Heiko: ?? remove ??
usb3 has no support in mainline.
Regulators not in use are disabled.
For mainline this node has no use....
As it already has a defined binding, we can put it in the device tree.
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 71
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +6
-0+ + vcc_sys: vcc-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc_sys"; + regulator-always-on; + regulator-boot-on;At the other regulators this is sort below the regulator limits.
Again, alphabetically sorted vs preferred sorting method.
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 81
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + vcc_wifi: vcc-wifi-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_en>; + regulator-name = "vcc_wifi";
Quoted 1 line
idem limits
Again, it is just a switch.
Quoted 34 lines
Quoted 33 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +33
-0+ regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc_io>; + }; +}; + +&analog_sound { + status = "okay"; +}; + +&codec { + status = "okay"; +}; + +&cpu0 { + cpu-supply = <&vdd_arm>; +}; + +&cpu1 { + cpu-supply = <&vdd_arm>; +}; + +&cpu2 { + cpu-supply = <&vdd_arm>; +}; + +&cpu3 { + cpu-supply = <&vdd_arm>; +}; + +&emmc { + bus-width = <8>; + cap-mmc-highspeed;
Quoted 4 lines
Quoted 1 line
+ max-frequency = <150000000>;
remove
already defined in dtsi
OK.
Quoted 74 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 124
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ mmc-ddr-1_8v; + mmc-hs200-1_8v; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>; + vmmc-supply = <&vcc_io>; + vqmmc-supply = <&vcc18_emmc>; + status = "okay"; +};////////////////////////
emmc: mmc@ff520000 { compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc"; reg = <0x0 0xff520000 0x0 0x4000>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>, <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>; clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; fifo-depth = <0x100>; max-frequency = <150000000>; status = "disabled"; };////////////////////////
Quoted 49 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +49
-0+ +&gmac2io { + assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; + assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; + clock_in_out = "input"; + phy-handle = <&rtl8211e>; + phy-mode = "rgmii"; + phy-supply = <&vcc_io>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmiim1_pins>; + snps,aal; + snps,rxpbl = <0x4>; + snps,txpbl = <0x4>; + tx_delay = <0x26>; + rx_delay = <0x11>; + status = "okay"; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + rtl8211e: ethernet-phy@1 { + reg = <1>; + pinctrl-0 = <ð_phy_int_pin>, <ð_phy_reset_pin>; + pinctrl-names = "default"; + interrupt-parent = <&gpio1>; + interrupts = <24 IRQ_TYPE_LEVEL_LOW>; + reset-assert-us = <10000>; + reset-deassert-us = <50000>; + reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gmac2phy { + pinctrl-names = "default"; + pinctrl-0 = <&fephyled_linkm1>, <&fephyled_rxm1>; + status = "okay"; +}; + +&i2c1 { + status = "okay"; + + rk805: pmic@18 { + compatible = "rockchip,rk805"; + reg = <0x18>; + interrupt-parent = <&gpio2>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
Quoted 3 lines
Quoted 1 line
+ #clock-cells = <1>;
all thing that start with "#" down the list
Is there a proper "preferred" sorting method defined somewhere?
Quoted 130 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 177
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +3
-0+ clock-output-names = "xin32k", "rk805-clkout2"; + gpio-controller; + #gpio-cells = <2>;idem
Quoted 122 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +122
-0+ pinctrl-names = "default"; + pinctrl-0 = <&pmic_int_l>; + rockchip,system-power-controller; + wakeup-source; + + vcc1-supply = <&vcc_sys>; + vcc2-supply = <&vcc_sys>; + vcc3-supply = <&vcc_sys>; + vcc4-supply = <&vcc_sys>; + vcc5-supply = <&vcc_io>; + vcc6-supply = <&vcc_sys>; + + regulators { + vdd_log: DCDC_REG1 { + regulator-name = "vdd_log"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1450000>; + regulator-ramp-delay = <12500>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1000000>; + }; + }; + + vdd_arm: DCDC_REG2 { + regulator-name = "vdd_arm"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1450000>; + regulator-ramp-delay = <12500>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <950000>; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-name = "vcc_ddr"; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vcc_io: DCDC_REG4 { + regulator-name = "vcc_io"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc_18: LDO_REG1 { + regulator-name = "vcc_18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcc18_emmc: LDO_REG2 { + regulator-name = "vcc18_emmc"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vdd_10: LDO_REG3 { + regulator-name = "vdd_10"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1000000>; + }; + }; + }; + }; +}; + +&i2s1 { + status = "okay"; +}; + +&io_domains { + pmuio-supply = <&vcc_io>; + vccio1-supply = <&vcc_io>; + vccio2-supply = <&vcc18_emmc>; + vccio3-supply = <&vcc_io>; + vccio4-supply = <&vcc_io>; + vccio5-supply = <&vcc_io>; + vccio6-supply = <&vcc_io>; + status = "okay"; +}; + +&pinctrl {
Quoted 3 lines
Quoted 1 line
+ ethernet-phy {
gmac2io
OK.
Quoted 8 lines
phy / ethernet-phy is a reserved node name
use something elsemake ARCH=arm64
dtbs_check/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dt.yaml: ethernet-phy:
'reg' is a required property
From schema:Documentation/devicetree/bindings/net/ethernet-phy.yaml
That's somewhat annoying. :(
I wouldn't say the name is "reserved", just that the binding checking mechanism can't account for these situations.
Quoted 22 lines
Quoted 21 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +21
-0+ eth_phy_int_pin: eth-phy-int-pin { + rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_down>; + }; + + eth_phy_reset_pin: eth-phy-reset-pin { + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>; + }; + }; + + leds { + led_pin: led-pin { + rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pmic { + pmic_int_l: pmic-int-l { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +
Quoted 8 lines
Quoted 1 line
+ usb3 {
usb
Last numbers in nodenames are more related to the sort order then to capabillity.
ie: mmc0, mmc1
All usb pin related things here.
I'd say it is more related to functionality in this case, as in "this group is for USB3 related pins". Makes more sense if the board supported both USB2 and USB3.
Quoted 29 lines
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +6
-0+ usb30_host_drv: usb30-host-drv { + rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + wifi {arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 337
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ wifi_en: wifi-en { + rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&sdmmc { + bus-width = <4>; + cap-mmc-highspeed;remove
micro SD onlyQuoted 8 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +8
-0+ cap-sd-highspeed; + disable-wp; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>; + vmmc-supply = <&vcc_sd>; + status = "okay"; +}; +
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 349
Quoted 4 lines
+&saradc {
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +3
-0+ vref-supply = <&vcc_18>; + status = "okay"; +};What happened to the recovery key from the schematic?
I believe I originally planned on adding it, but failed to find a proper key event for it. Any suggestions?
AFAIK only U-boot handles the recovery button, but in its case it just looks for the saradc and reads from a predefined channel.
Regards
ChenYu
Quoted 13 lines
Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +13
-0+ +&tsadc { + status = "okay"; +}; + +&u2phy { + status = "okay"; +}; + +&u2phy_host { + status = "okay"; +}; +
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 369
Quoted 8 lines
+&uart2 {
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +6
-0+ status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +};
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Heiko Stübner
maintainerRe: [PATCH 3/3] arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E
Hi,
Am Sonntag, 10. Januar 2021, 16:37:15 CET schrieb Chen-Yu Tsai:
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +5
-0+ vcc_sd: sdmmc-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0m1_pin>;
Quoted 8 lines
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 51
Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +2
-0+ regulator-boot-on; + regulator-name = "vcc_sd";regulator-name above other regulator properties
That is actually what I was used to, but some other rockchip dts files have all the properties sorted alphabetically. So I stuck with what I saw.
I try to keep it alphabetical except for the exceptions :-D .
regulator-name is such an exception. Similar to compatibles, the regulator-name is an entry needed to see if you're at the right node, so I really like it being the topmost regulator-foo property - just makes reading easier.
(same for the compatible first, then regs, interrupts parts, as well as "status-last")
But oftentimes, I just fix the ordering when applying - but seem to have missed this somewhere in those "other Rockchip dts files" ;-) .
Quoted 11 lines
Quoted 10 lines
regulator voltage missing
make things as complete as possiblefrom
fixed-regulator.yaml:description:
Any property defined as part of the core regulator binding, defined inregulator.yaml, can also be used. However a fixed voltage regulator is expected to have the regulator-min-microvolt and regulator-max-microvolt to be the same.
Quoted 3 lines
However this is not a real regulator; it is merely an on/off switch. I believe in this case it should just pass through the voltage from its upstream.
regulator-voltages are not marked required so can stay away if it's just a dumb switch. I guess it's ok both ways and for individual board- devicetrees the impact either way is minimal.
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
+&i2c1 {
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +7
-0+ status = "okay"; + + rk805: pmic@18 { + compatible = "rockchip,rk805"; + reg = <0x18>; + interrupt-parent = <&gpio2>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
+ #clock-cells = <1>;
all thing that start with "#" down the list
Is there a proper "preferred" sorting method defined somewhere?
I struggle with that often as well, but normally I'd do #clocks to clocks with out "#", but really don't have a hard preference here.
especially as just ignoring the "#" would make #address-cells + #size-cells look strangely sorted ... so more of a common sense thingy.
Quoted 26 lines
Quoted 26 lines
Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +13
-0+ eth_phy_int_pin: eth-phy-int-pin { + rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_down>; + }; + + eth_phy_reset_pin: eth-phy-reset-pin { + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>; + }; + }; + + leds { + led_pin: led-pin { + rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + };arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 322
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ }; + + pmic { + pmic_int_l: pmic-int-l { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + usb3 {usb
Quoted 8 lines
Quoted 4 lines
Last numbers in nodenames are more related to the sort order then to capabillity.
ie: mmc0, mmc1
All usb pin related things here.I'd say it is more related to functionality in this case, as in "this group is for USB3 related pins". Makes more sense if the board supported both USB2 and USB3.
I'd agree :-) ... especially as usb controllers on Rockchip boards are not really numbered and I think we already have precedent for
usb2 -> usb version 2 pins in some other boards ;-)
Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +12
-0+ cap-sd-highspeed; + disable-wp; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>; + vmmc-supply = <&vcc_sd>; + status = "okay"; +}; + +&saradc { + vref-supply = <&vcc_18>; + status = "okay"; +};
Quoted 4 lines
Quoted 1 line
What happened to the recovery key from the schematic?
I believe I originally planned on adding it, but failed to find a proper key event for it. Any suggestions?
Most boards seem to use the KEY_VENDOR keycode.
Heiko
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Re: [PATCH 3/3] arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E
Quoted 26 lines · Heiko Stübner
Hi,
Am Sonntag, 10. Januar 2021, 16:37:15 CET schrieb Chen-Yu Tsai:
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +5
-0+ vcc_sd: sdmmc-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0m1_pin>;Quoted 8 lines
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 51
Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +2
-0+ regulator-boot-on; + regulator-name = "vcc_sd";regulator-name above other regulator properties
That is actually what I was used to, but some other rockchip dts files have all the properties sorted alphabetically. So I stuck with what I saw.
I try to keep it alphabetical except for the exceptions :-D .
regulator-name is such an exception. Similar to compatibles, the regulator-name is an entry needed to see if you're at the right node, so I really like it being the topmost regulator-foo property - just makes reading easier.
Quoted 5 lines
(same for the compatible first, then regs, interrupts parts, as well as "status-last")
But oftentimes, I just fix the ordering when applying - but seem to have missed this somewhere in those "other Rockchip dts files" ;-) .
I was slightly confused. I looked again and yes regulator-name is always the first regulator related property. What's off is that in some cases min/max voltage comes before always-on/boot-on, and in others vice versa.
For example in the Rock64 and ROC-RK3328-CC device trees, in the fixed regulators, always-on/boot-on come before min/max voltage, while in the PMIC the other order is used.
ChenYu
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Heiko Stübner
maintainerRe: [PATCH 3/3] arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E
Am Montag, 11. Januar 2021, 04:27:47 CET schrieb Chen-Yu Tsai:
Quoted 33 lines · Heiko Stübner
Quoted 26 lines
Hi,
Am Sonntag, 10. Januar 2021, 16:37:15 CET schrieb Chen-Yu Tsai:
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +5
-0+ vcc_sd: sdmmc-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0m1_pin>;Quoted 8 lines
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 51
Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +2
-0+ regulator-boot-on; + regulator-name = "vcc_sd";regulator-name above other regulator properties
That is actually what I was used to, but some other rockchip dts files have all the properties sorted alphabetically. So I stuck with what I saw.
I try to keep it alphabetical except for the exceptions :-D .
regulator-name is such an exception. Similar to compatibles, the regulator-name is an entry needed to see if you're at the right node, so I really like it being the topmost regulator-foo property - just makes reading easier.
Quoted 5 lines
(same for the compatible first, then regs, interrupts parts, as well as "status-last")
But oftentimes, I just fix the ordering when applying - but seem to have missed this somewhere in those "other Rockchip dts files" ;-) .
Quoted 7 lines
I was slightly confused. I looked again and yes regulator-name is always the first regulator related property. What's off is that in some cases min/max voltage comes before always-on/boot-on, and in others vice versa.
For example in the Rock64 and ROC-RK3328-CC device trees, in the fixed regulators, always-on/boot-on come before min/max voltage, while in the PMIC the other order is used.
That's likely undecidednes on my part ;-)
There could be an argument for a "name, voltages, flags" sorting, but on the other hand just keeping it alphabetical with the naming on top creates less special cases.
Heiko
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Re: [PATCH 3/3] arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E
Quoted 43 lines · Heiko Stübner
Am Montag, 11. Januar 2021, 04:27:47 CET schrieb Chen-Yu Tsai:
Quoted 33 lines · Heiko Stübner
Quoted 26 lines
Hi,
Am Sonntag, 10. Januar 2021, 16:37:15 CET schrieb Chen-Yu Tsai:
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +5
-0+ vcc_sd: sdmmc-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0m1_pin>;Quoted 8 lines
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 51
Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +2
-0+ regulator-boot-on; + regulator-name = "vcc_sd";regulator-name above other regulator properties
That is actually what I was used to, but some other rockchip dts files have all the properties sorted alphabetically. So I stuck with what I saw.
I try to keep it alphabetical except for the exceptions :-D .
regulator-name is such an exception. Similar to compatibles, the regulator-name is an entry needed to see if you're at the right node, so I really like it being the topmost regulator-foo property - just makes reading easier.
Quoted 5 lines
(same for the compatible first, then regs, interrupts parts, as well as "status-last")
But oftentimes, I just fix the ordering when applying - but seem to have missed this somewhere in those "other Rockchip dts files" ;-) .
Quoted 7 lines
I was slightly confused. I looked again and yes regulator-name is always the first regulator related property. What's off is that in some cases min/max voltage comes before always-on/boot-on, and in others vice versa.
For example in the Rock64 and ROC-RK3328-CC device trees, in the fixed regulators, always-on/boot-on come before min/max voltage, while in the PMIC the other order is used.
Quoted 5 lines
That's likely undecidednes on my part ;-)
There could be an argument for a "name, voltages, flags" sorting, but on the other hand just keeping it alphabetical with the naming on top creates less special cases.
And min before max? :D
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Re: [PATCH 3/3] arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E
In reply to Chen-Yu TsaiHi Chen-Yu,
Most is already answered by Heiko.
Quoted 138 lines · Chen-Yu Tsai
Hi,
Quoted 97 lines · Johan Jonker
Hi Chen-Yu,
Some comments, have a look if it is useful...
Quoted 90 lines · Chen-Yu Tsai
From: Chen-Yu Tsai <[email protected]>
Radxa ROCK Pi E is a router oriented SBC based on Rockchip's RK3328 SoC. As the official wiki page puts it, "E for Ethernets".
It features the RK3328 SoC, gigabit and fast Ethernet RJ45 ports, both directly served by Ethernet controllers in the SoC, a USB 3.0 host port, a power-only USB type-C port, a 3.5mm headphone jack for audio output,
two LEDs, a 40-pin Raspberry Pi style GPIO header, and optional WiFi+BT and PoE header.
The board comes in multiple configurations, differing in the amount of onboard RAM, the level of WiFi+BT (none, 802.11n 2.4GHz, or 802.11ac 2.4 GHz & 5 GHz), and whether PoE is supported or not. These variants can all share the same device tree.
The USB 2.0 OTG controller is available on the 40-pin header. This is not enabled in the device tree, since it is possible to use it in a host-only configuration, or in OTG mode with an extra pin from the header as the ID pin.
The device tree is based on the one of the Rock64, with various parts modified to match the ROCK Pi E, and some parts updated to newer styles, such as the gmac2io node's mdio sub-node.
Add a new device tree file for the new board.
Signed-off-by Chen-Yu Tsai <[email protected]>--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3328-rock-pi-e.dts | 369 ++++++++++++++++++ 2 files changed, 370 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dtsarch/arm64/boot/dts/rockchip/Makefile +1
-0@@ -11,6 +11,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox.dtbarch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +37
-0@@ -0,0 +1,369 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * (C) Copyright 2020 Chen-Yu Tsai <[email protected]> + * + * Based on ./rk3328-rock64.dts, which is + * + * Copyright (c) 2017 PINE64 + */ + +/dts-v1/; + +#include <dt-bindings/leds/common.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/pinctrl/rockchip.h> +#include "rk3328.dtsi" + +/ { + model = "Radxa ROCK Pi E"; + compatible = "radxa,rockpi-e", "rockchip,rk3328"; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + gmac_clkin: external-gmac-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "gmac_clkin"; + #clock-cells = <0>; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-0 = <&led_pin>; + pinctrl-names = "default"; + + led-0 {Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 38
Quoted 1 line
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +1
-0+ /* schematic say green but the actual thing is blue */In rockpie-v1.2-20200427-sch.pdf this led is already called "
LED_BLUE", so comment maybe not needed anymore?Thanks. Did not notice there was a new revision.
Quoted 11 lines
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ color = <LED_COLOR_ID_BLUE>; + gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + };> + }; + + vcc_sd: sdmmc-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0m1_pin>;Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 51
Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +2
-0+ regulator-boot-on; + regulator-name = "vcc_sd";regulator-name above other regulator properties
That is actually what I was used to, but some other rockchip dts files have all the properties sorted alphabetically. So I stuck with what I saw.
Quoted 10 lines
regulator voltage missing
make things as complete as possiblefrom
fixed-regulator.yaml:description:
Any property defined as part of the core regulator binding, defined inregulator.yaml, can also be used. However a fixed voltage regulator is expected to have the regulator-min-microvolt and regulator-max-microvolt to be the same.
Quoted 3 lines
However this is not a real regulator; it is merely an on/off switch. I believe in this case it should just pass through the voltage from its upstream.
This board is not black box. The schematics are public, so finding out limits was not the problem. Up to you if added or not...
Quoted 34 lines
Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 61
Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ vin-supply = <&vcc_io>; + }; + + vcc_host_5v: vcc-host-5v-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb30_host_drv>; + enable-active-high; + regulator-name = "vcc_host_5v";Quoted 1 line
idem limits
Same here.
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 65
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +4
-0+ regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc_sys>; + };For Heiko: ?? remove ??
usb3 has no support in mainline.
Regulators not in use are disabled.
For mainline this node has no use....As it already has a defined binding, we can put it in the device tree.
Quoted 5 lines
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +4
-0+ + vcc_sys: vcc-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc_sys";
Quoted 6 lines
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +2
-0+ regulator-always-on; + regulator-boot-on;At the other regulators this is sort below the regulator limits.
Again, alphabetically sorted vs preferred sorting method.
There's some room for "creativity", but you must use that "style" document wise. But not above limits in "vcc_sys" and below in "vcc_io".
From Heiko:
compatible
reg
interrupts
[alphabetical]
status [if needed]
////////////////////
My list:
For nodes:
If exists on top: model, compatible and chosen.
Sort things without reg alphabetical first,
then sort the rest by reg address.
Inside nodes:
If exists on top: compatible, reg and interrupts.
In alphabetical order the required properties.
Then in alphabetical order the other properties.
And as last things that start with '#' in alphabetical order. Add status below all other properties for soc internal components with any board-specifics.
Keep an empty line between properties and nodes.
Exceptions:
Sort pinctrl-0 above pinctrl-names, so it stays in line with clock-names and dma-names.
Sort simple-audio-card,name above other simple-audio-card properties. Sort regulator-name above other regulator properties.
Sort regulator-min-microvolt above regulator-max-microvolt.
Quoted 131 lines
Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 81
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + vcc_wifi: vcc-wifi-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_en>; + regulator-name = "vcc_wifi";Quoted 1 line
idem limits
Again, it is just a switch.
Quoted 34 lines
Quoted 33 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +33
-0+ regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc_io>; + }; +}; + +&analog_sound { + status = "okay"; +}; + +&codec { + status = "okay"; +}; + +&cpu0 { + cpu-supply = <&vdd_arm>; +}; + +&cpu1 { + cpu-supply = <&vdd_arm>; +}; + +&cpu2 { + cpu-supply = <&vdd_arm>; +}; + +&cpu3 { + cpu-supply = <&vdd_arm>; +}; + +&emmc { + bus-width = <8>; + cap-mmc-highspeed;Quoted 4 lines
Quoted 1 line
+ max-frequency = <150000000>;
remove
already defined in dtsiOK.
Quoted 74 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 124
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ mmc-ddr-1_8v; + mmc-hs200-1_8v; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>; + vmmc-supply = <&vcc_io>; + vqmmc-supply = <&vcc18_emmc>; + status = "okay"; +};////////////////////////
emmc: mmc@ff520000 { compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc"; reg = <0x0 0xff520000 0x0 0x4000>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>, <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>; clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; fifo-depth = <0x100>; max-frequency = <150000000>; status = "disabled"; };////////////////////////
Quoted 49 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +49
-0+ +&gmac2io { + assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; + assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; + clock_in_out = "input"; + phy-handle = <&rtl8211e>; + phy-mode = "rgmii"; + phy-supply = <&vcc_io>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmiim1_pins>; + snps,aal; + snps,rxpbl = <0x4>; + snps,txpbl = <0x4>; + tx_delay = <0x26>; + rx_delay = <0x11>; + status = "okay"; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + rtl8211e: ethernet-phy@1 { + reg = <1>; + pinctrl-0 = <ð_phy_int_pin>, <ð_phy_reset_pin>; + pinctrl-names = "default"; + interrupt-parent = <&gpio1>; + interrupts = <24 IRQ_TYPE_LEVEL_LOW>; + reset-assert-us = <10000>; + reset-deassert-us = <50000>; + reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gmac2phy { + pinctrl-names = "default"; + pinctrl-0 = <&fephyled_linkm1>, <&fephyled_rxm1>; + status = "okay"; +}; + +&i2c1 { + status = "okay"; + + rk805: pmic@18 { + compatible = "rockchip,rk805"; + reg = <0x18>; + interrupt-parent = <&gpio2>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
+ #clock-cells = <1>;
all thing that start with "#" down the list
Is there a proper "preferred" sorting method defined somewhere?
See above.
Quoted 220 lines
Quoted 131 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 177
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +3
-0+ clock-output-names = "xin32k", "rk805-clkout2"; + gpio-controller; + #gpio-cells = <2>;idem
Quoted 122 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +122
-0+ pinctrl-names = "default"; + pinctrl-0 = <&pmic_int_l>; + rockchip,system-power-controller; + wakeup-source; + + vcc1-supply = <&vcc_sys>; + vcc2-supply = <&vcc_sys>; + vcc3-supply = <&vcc_sys>; + vcc4-supply = <&vcc_sys>; + vcc5-supply = <&vcc_io>; + vcc6-supply = <&vcc_sys>; + + regulators { + vdd_log: DCDC_REG1 { + regulator-name = "vdd_log"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1450000>; + regulator-ramp-delay = <12500>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1000000>; + }; + }; + + vdd_arm: DCDC_REG2 { + regulator-name = "vdd_arm"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1450000>; + regulator-ramp-delay = <12500>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <950000>; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-name = "vcc_ddr"; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vcc_io: DCDC_REG4 { + regulator-name = "vcc_io"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc_18: LDO_REG1 { + regulator-name = "vcc_18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcc18_emmc: LDO_REG2 { + regulator-name = "vcc18_emmc"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vdd_10: LDO_REG3 { + regulator-name = "vdd_10"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1000000>; + }; + }; + }; + }; +}; + +&i2s1 { + status = "okay"; +}; + +&io_domains { + pmuio-supply = <&vcc_io>; + vccio1-supply = <&vcc_io>; + vccio2-supply = <&vcc18_emmc>; + vccio3-supply = <&vcc_io>; + vccio4-supply = <&vcc_io>; + vccio5-supply = <&vcc_io>; + vccio6-supply = <&vcc_io>; + status = "okay"; +}; + +&pinctrl {Quoted 3 lines
Quoted 1 line
+ ethernet-phy {
gmac2io
OK.
Quoted 8 lines
phy / ethernet-phy is a reserved node name
use something elsemake ARCH=arm64
dtbs_check/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dt.yaml: ethernet-phy:
'reg' is a required property
From schema:Documentation/devicetree/bindings/net/ethernet-phy.yamlThat's somewhat annoying. :(
I wouldn't say the name is "reserved", just that the binding checking mechanism can't account for these situations.
Quoted 22 lines
Quoted 21 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +21
-0+ eth_phy_int_pin: eth-phy-int-pin { + rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_down>; + }; + + eth_phy_reset_pin: eth-phy-reset-pin { + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>; + }; + }; + + leds { + led_pin: led-pin { + rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pmic { + pmic_int_l: pmic-int-l { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +Quoted 8 lines
Quoted 1 line
+ usb3 {
usb
Last numbers in nodenames are more related to the sort order then to capabillity.
ie: mmc0, mmc1
All usb pin related things here.I'd say it is more related to functionality in this case, as in "this group is for USB3 related pins". Makes more sense if the board supported both USB2 and USB3.
Quoted 34 lines
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +6
-0+ usb30_host_drv: usb30-host-drv { + rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + wifi {arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 337
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ wifi_en: wifi-en { + rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&sdmmc { + bus-width = <4>; + cap-mmc-highspeed;remove
micro SD onlyQuoted 13 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +12
-0+ cap-sd-highspeed; + disable-wp; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>; + vmmc-supply = <&vcc_sd>; + status = "okay"; +}; + +&saradc { + vref-supply = <&vcc_18>; + status = "okay"; +};
Quoted 4 lines
Quoted 1 line
What happened to the recovery key from the schematic?
I believe I originally planned on adding it, but failed to find a proper key event for it. Any suggestions?
The consensus seem to be "KEY_VENDOR".
Example:
adc-keys {
compatible = "adc-keys";
io-channels = <&saradc 0>;
io-channel-names = "buttons";
keyup-threshold-microvolt = <1800000>;
poll-interval = <100>;
recovery {
label = "recovery";
linux,code = <KEY_VENDOR>;
press-threshold-microvolt = <17000>;
};
};Quoted 30 lines
AFAIK only U-boot handles the recovery button, but in its case it just looks for the saradc and reads from a predefined channel.
Regards
ChenYuQuoted 22 lines
Quoted 21 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +20
-0+ +&tsadc { + status = "okay"; +}; + +&u2phy { + status = "okay"; +}; + +&u2phy_host { + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +};
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Re: [PATCH 3/3] arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E
Quoted 144 lines · Johan Jonker
Hi Chen-Yu,
Most is already answered by Heiko.
Quoted 138 lines · Chen-Yu Tsai
Hi,
Quoted 97 lines · Johan Jonker
Hi Chen-Yu,
Some comments, have a look if it is useful...
Quoted 90 lines · Chen-Yu Tsai
From: Chen-Yu Tsai <[email protected]>
Radxa ROCK Pi E is a router oriented SBC based on Rockchip's RK3328 SoC. As the official wiki page puts it, "E for Ethernets".
It features the RK3328 SoC, gigabit and fast Ethernet RJ45 ports, both directly served by Ethernet controllers in the SoC, a USB 3.0 host port, a power-only USB type-C port, a 3.5mm headphone jack for audio output,
two LEDs, a 40-pin Raspberry Pi style GPIO header, and optional WiFi+BT and PoE header.
The board comes in multiple configurations, differing in the amount of onboard RAM, the level of WiFi+BT (none, 802.11n 2.4GHz, or 802.11ac 2.4 GHz & 5 GHz), and whether PoE is supported or not. These variants can all share the same device tree.
The USB 2.0 OTG controller is available on the 40-pin header. This is not enabled in the device tree, since it is possible to use it in a host-only configuration, or in OTG mode with an extra pin from the header as the ID pin.
The device tree is based on the one of the Rock64, with various parts modified to match the ROCK Pi E, and some parts updated to newer styles, such as the gmac2io node's mdio sub-node.
Add a new device tree file for the new board.
Signed-off-by Chen-Yu Tsai <[email protected]>--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3328-rock-pi-e.dts | 369 ++++++++++++++++++ 2 files changed, 370 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dtsarch/arm64/boot/dts/rockchip/Makefile +1
-0@@ -11,6 +11,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox.dtbarch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +37
-0@@ -0,0 +1,369 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * (C) Copyright 2020 Chen-Yu Tsai <[email protected]> + * + * Based on ./rk3328-rock64.dts, which is + * + * Copyright (c) 2017 PINE64 + */ + +/dts-v1/; + +#include <dt-bindings/leds/common.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/pinctrl/rockchip.h> +#include "rk3328.dtsi" + +/ { + model = "Radxa ROCK Pi E"; + compatible = "radxa,rockpi-e", "rockchip,rk3328"; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + gmac_clkin: external-gmac-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "gmac_clkin"; + #clock-cells = <0>; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-0 = <&led_pin>; + pinctrl-names = "default"; + + led-0 {Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 38
Quoted 1 line
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +1
-0+ /* schematic say green but the actual thing is blue */In rockpie-v1.2-20200427-sch.pdf this led is already called "
LED_BLUE", so comment maybe not needed anymore?Thanks. Did not notice there was a new revision.
Quoted 11 lines
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ color = <LED_COLOR_ID_BLUE>; + gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + };> + }; + + vcc_sd: sdmmc-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0m1_pin>;Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 51
Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +2
-0+ regulator-boot-on; + regulator-name = "vcc_sd";regulator-name above other regulator properties
That is actually what I was used to, but some other rockchip dts files have all the properties sorted alphabetically. So I stuck with what I saw.
Quoted 10 lines
regulator voltage missing
make things as complete as possiblefrom
fixed-regulator.yaml:description:
Any property defined as part of the core regulator binding, defined inregulator.yaml, can also be used. However a fixed voltage regulator is expected to have the regulator-min-microvolt and regulator-max-microvolt to be the same.
Quoted 6 lines
Quoted 3 lines
However this is not a real regulator; it is merely an on/off switch. I believe in this case it should just pass through the voltage from its upstream.
This board is not black box. The schematics are public, so finding out limits was not the problem. Up to you if added or not...
As far as Linux is concerned, if the regulator does not have constraints / voltages, then its upstream one's values is passed through. I believe that correctly represents what the hardware is doing, so I will stick to that. I might have asked Mark about this in the past, but I don't remember exactly when and where.
Quoted 36 lines
Quoted 36 lines
Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 61
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ vin-supply = <&vcc_io>; + }; + + vcc_host_5v: vcc-host-5v-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb30_host_drv>; + enable-active-high; + regulator-name = "vcc_host_5v";Quoted 1 line
idem limits
Same here.
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 65
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +4
-0+ regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc_sys>; + };For Heiko: ?? remove ??
usb3 has no support in mainline.
Regulators not in use are disabled.
For mainline this node has no use....As it already has a defined binding, we can put it in the device tree.
Quoted 8 lines
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +6
-0+ + vcc_sys: vcc-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc_sys"; + regulator-always-on; + regulator-boot-on;
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
At the other regulators this is sort below the regulator limits.
Again, alphabetically sorted vs preferred sorting method.
There's some room for "creativity", but you must use that "style" document wise. But not above limits in "
vcc_sys" and below in "vcc_io".
Sorry. I thought you were referring to the other fixed regulators. I see now you meant the regulators in the PMIC. I will fix those up to have consistent styling.
Seems that other boards have the same problem.
Quoted 17 lines
From Heiko:
compatible
reg
interrupts
[alphabetical]
status [if needed]////////////////////
My list:
For nodes:
If exists on top: model, compatible and chosen.
Sort things without reg alphabetical first,
then sort the rest by reg address.
Quoted 5 lines
Inside nodes:
If exists on top: compatible, reg and interrupts. In alphabetical order the required properties.
Then in alphabetical order the other properties. And as last things that start with '#' in alphabetical order.
For me, it makes more sense to keep #gpio-cells grouped together with gpio-controller, and the same for other controller types. #clock-cells grouped with clock-output-names also makes it easier to read.
#address-cells and #size-cells naturally go to the end of the list as what they really affect are the child nodes, which get listed after.
Since Heiko is OK either way, I'll stick to my ordering for now.
Quoted 158 lines
Add status below all other properties for soc internal components with any board-specifics.
Keep an empty line between properties and nodes.Exceptions:
Sort pinctrl-0 above pinctrl-names, so it stays in line with clock-names and dma-names.
Sort simple-audio-card,name above other simple-audio-card properties. Sort regulator-name above other regulator properties.
Sort regulator-min-microvolt above regulator-max-microvolt.Quoted 131 lines
Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 81
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +10
-0+ regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + vcc_wifi: vcc-wifi-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_en>; + regulator-name = "vcc_wifi";Quoted 1 line
idem limits
Again, it is just a switch.
Quoted 34 lines
Quoted 33 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +33
-0+ regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc_io>; + }; +}; + +&analog_sound { + status = "okay"; +}; + +&codec { + status = "okay"; +}; + +&cpu0 { + cpu-supply = <&vdd_arm>; +}; + +&cpu1 { + cpu-supply = <&vdd_arm>; +}; + +&cpu2 { + cpu-supply = <&vdd_arm>; +}; + +&cpu3 { + cpu-supply = <&vdd_arm>; +}; + +&emmc { + bus-width = <8>; + cap-mmc-highspeed;Quoted 4 lines
Quoted 1 line
+ max-frequency = <150000000>;
remove
already defined in dtsiOK.
Quoted 74 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 124
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ mmc-ddr-1_8v; + mmc-hs200-1_8v; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>; + vmmc-supply = <&vcc_io>; + vqmmc-supply = <&vcc18_emmc>; + status = "okay"; +};////////////////////////
emmc: mmc@ff520000 { compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc"; reg = <0x0 0xff520000 0x0 0x4000>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>, <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>; clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; fifo-depth = <0x100>; max-frequency = <150000000>; status = "disabled"; };////////////////////////
Quoted 49 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +49
-0+ +&gmac2io { + assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; + assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; + clock_in_out = "input"; + phy-handle = <&rtl8211e>; + phy-mode = "rgmii"; + phy-supply = <&vcc_io>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmiim1_pins>; + snps,aal; + snps,rxpbl = <0x4>; + snps,txpbl = <0x4>; + tx_delay = <0x26>; + rx_delay = <0x11>; + status = "okay"; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + rtl8211e: ethernet-phy@1 { + reg = <1>; + pinctrl-0 = <ð_phy_int_pin>, <ð_phy_reset_pin>; + pinctrl-names = "default"; + interrupt-parent = <&gpio1>; + interrupts = <24 IRQ_TYPE_LEVEL_LOW>; + reset-assert-us = <10000>; + reset-deassert-us = <50000>; + reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gmac2phy { + pinctrl-names = "default"; + pinctrl-0 = <&fephyled_linkm1>, <&fephyled_rxm1>; + status = "okay"; +}; + +&i2c1 { + status = "okay"; + + rk805: pmic@18 { + compatible = "rockchip,rk805"; + reg = <0x18>; + interrupt-parent = <&gpio2>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>;Quoted 5 lines
Quoted 3 lines
Quoted 1 line
+ #clock-cells = <1>;
all thing that start with "#" down the list
Is there a proper "preferred" sorting method defined somewhere?
See above.
Quoted 8 lines
Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 177
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +3
-0+ clock-output-names = "xin32k", "rk805-clkout2"; + gpio-controller; + #gpio-cells = <2>;idem
snip
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 300
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +3
-0+ +&pinctrl { + ethernet-phy {gmac2io
OK.
I thought about this a bit more, and I think e-phy or ephy would be a better name, since these pin functions are not directly related to gmac2io, but the external Ethernet PHY.
It would be nicer if we could fix the ethernet-phy binding though.
Quoted 23 lines
Quoted 23 lines
Quoted 8 lines
phy / ethernet-phy is a reserved node name
use something elsemake ARCH=arm64
dtbs_check/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dt.yaml: ethernet-phy:
'reg' is a required property
From schema:Documentation/devicetree/bindings/net/ethernet-phy.yamlThat's somewhat annoying. :(
I wouldn't say the name is "reserved", just that the binding checking mechanism can't account for these situations.
Quoted 9 lines
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +9
-0+ eth_phy_int_pin: eth-phy-int-pin { + rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_down>; + }; + + eth_phy_reset_pin: eth-phy-reset-pin { + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>; + }; + }; +
snip
Quoted 14 lines
Quoted 9 lines
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 349
Quoted 4 lines
+&saradc {
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts new file +3
-0+ vref-supply = <&vcc_18>; + status = "okay"; +};What happened to the recovery key from the schematic?
I believe I originally planned on adding it, but failed to find a proper key event for it. Any suggestions?
The consensus seem to be "
KEY_VENDOR".Example:
Quoted 13 lines
adc-keys {
compatible = "adc-keys";
io-channels = <&saradc 0>;
io-channel-names = "buttons";
keyup-threshold-microvolt = <1800000>;
poll-interval = <100>;
recovery {
label = "recovery";
linux,code = <KEY_VENDOR>;
press-threshold-microvolt = <17000>;
};
};Thanks. Though I really wonder what Linux or other OSes could do with it.
ChenYu
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip