Skip to content

Commit

Permalink
Merge pull request radxa-pkg#317 from Radxa-Alvin/main
Browse files Browse the repository at this point in the history
feat: add radxa zero3 poe overlay
  • Loading branch information
RadxaYuntian authored May 16, 2024
2 parents 541ffea + 32baacd commit aba523c
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ dtb-$(CONFIG_CLK_RK3528) += \
rk3528-uart3-m1.dtbo \
rk3528-uart7-m0.dtbo \
rock-2a-eeprom.dtbo \
rock-2a-enable-pcie.dtbo
rock-2a-enable-pcie.dtbo \
rock-2a-poe-hat.dtbo

dtb-$(CONFIG_CLK_RK3568) += \
audioinjector-isolated-soundcard.dtbo \
Expand Down Expand Up @@ -300,6 +301,7 @@ dtb-$(CONFIG_CPU_RK3568) += \
radxa-zero3-radxa-camera-8m.dtbo \
radxa-zero3-rpi-camera-v1.3.dtbo \
radxa-zero3-rpi-camera-v2.dtbo \
radxa-zero3-poe-hat.dtbo \
radxa-zero3-disabled-ethernet.dtbo \
radxa-zero3-disabled-wireless.dtbo \
rock-3a-radxa-display-8hd.dtbo \
Expand Down
55 changes: 55 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlays/radxa-zero3-poe-hat.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/thermal/thermal.h>

/ {
metadata {
title = "Enable Radxa ZERO 3E PoE HAT";
category = "misc";
compatible = "radxa,zero3";
description = "Enable Radxa ZERO 3E PoE HAT.";
exclusive = "GPIO3_C3";
package = "rsetup-config-thermal-governor-step-wise";
};
};

&{/} {
radxa_poe_pwm: radxa-poe-pwm {
compatible = "pwm-gpio";
#pwm-cells = <3>;
pwm-gpio = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
};

radxa_poe_fan: radxa-poe-fan {
compatible = "pwm-fan";
#cooling-cells = <2>;
cooling-min-state = <0>;
cooling-max-state = <4>;
cooling-levels = <0 64 128 192 255>;
pwms = <&radxa_poe_pwm 0 40000 PWM_POLARITY_INVERTED>;
};
};

&threshold {
temperature = <60000>;
};

&soc_thermal {
sustainable-power = <5000>; /* milliwatts */
cooling-maps {
map2 {
trip = <&target>;
cooling-device = <&radxa_poe_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
contribution = <8192>;
};
map3 {
trip = <&threshold>;
cooling-device = <&radxa_poe_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
contribution = <8192>;
};
};
};
61 changes: 61 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlays/rock-2a-poe-hat.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/thermal/thermal.h>

/ {
metadata {
title = "Enable Radxa 25W PoE+ HAT";
category = "misc";
compatible = "radxa,rock-2a";
description = "Enable Radxa 25W PoE+ HAT.";
exclusive = "GPIO1_B1", "GPIO4_A6";
package = "rsetup-config-thermal-governor-step-wise";
};
};

&{/} {
radxa_pow_w1: radxa-poe-w1 {
compatible = "w1-gpio";
gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
status = "okay";
};

radxa_poe_pwm: radxa-poe-pwm {
compatible = "pwm-gpio";
#pwm-cells = <3>;
pwm-gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>;
};

radxa_poe_fan: radxa-poe-fan {
compatible = "pwm-fan";
#cooling-cells = <2>;
cooling-min-state = <0>;
cooling-max-state = <4>;
cooling-levels = <0 64 128 192 255>;
pwms = <&radxa_poe_pwm 0 40000 PWM_POLARITY_INVERTED>;
};
};

&threshold {
temperature = <60000>;
};

&soc_thermal {
sustainable-power = <5000>; /* milliwatts */
cooling-maps {
map2 {
trip = <&target>;
cooling-device = <&radxa_poe_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
contribution = <8192>;
};
map3 {
trip = <&threshold>;
cooling-device = <&radxa_poe_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
contribution = <8192>;
};
};
};

0 comments on commit aba523c

Please sign in to comment.