Skip to content

Commit

Permalink
refactor: ZERO series overlays are replaced with reference syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeChenL committed Apr 12, 2024
1 parent 6e46ebb commit d1d348e
Show file tree
Hide file tree
Showing 10 changed files with 238 additions and 359 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
exclusive = "vddio_c";
description = "Enable 1.8V signaling for data microSD.\nThis will make reboot fail if booting from microSD.";
};
};

fragment@2 {
target = <&vddio_c>;
__overlay__ {
gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;
};
};
};
&vddio_c {
gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;
};
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/ {
fragment@0 {
target = <&led_power_151>;
__overlay__ {
status = "disabled";
};
};
&led_power_151 {
status = "disabled";
};
11 changes: 4 additions & 7 deletions arch/arm64/boot/dts/amlogic/overlays/radxa-zero-led-8-off.dts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
exclusive = "led_power";
description = "Enable GPIOAO_8 for hardware version 1.51 and later.\nThis is due to older version uses this for Power LED.";
};
};

fragment@0 {
target = <&led_power>;
__overlay__ {
status = "disabled";
};
};
};
&led_power {
status = "disabled";
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
exclusive = "vddio_c";
description = "Enable 1.8V signaling for data microSD.\nThis will make reboot fail if booting from microSD.";
};
};

fragment@2 {
target = <&vddio_c>;
__overlay__ {
gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
};
};
};
&vddio_c {
gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
};
73 changes: 31 additions & 42 deletions arch/arm64/boot/dts/amlogic/overlays/radxa-zero2-radxa-25w-poe.dts
Original file line number Diff line number Diff line change
Expand Up @@ -15,56 +15,45 @@
exclusive = "i2c0", "GPIOAO_8", "GPIOZ_2", "GPIOZ_0", "GPIOZ_1";
package = "rsetup-config-thermal-governor-step-wise";
};
};

fragment@0 {
target-path = "/";
__overlay__ {
radxa_pow_w1: radxa-poe-w1 {
compatible = "w1-gpio";
gpios = <&gpio GPIOZ_2 GPIO_ACTIVE_HIGH>;
status = "okay";
};

radxa_poe_pwm: radxa-poe-pwm {
compatible = "pwm-gpio";
#pwm-cells = <3>;
pwm-gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;
};
&{/} {
radxa_pow_w1: radxa-poe-w1 {
compatible = "w1-gpio";
gpios = <&gpio GPIOZ_2 GPIO_ACTIVE_HIGH>;
status = "okay";
};

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>;
};
};
radxa_poe_pwm: radxa-poe-pwm {
compatible = "pwm-gpio";
#pwm-cells = <3>;
pwm-gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;
};

fragment@1 {
target = <&cpu_thermal>;
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>;
};
};

__overlay__ {
cooling-maps {
map2 {
cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&radxa_poe_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
&cpu_thermal {
cooling-maps {
map2 {
cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&radxa_poe_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
};

fragment@2 {
target = <&ddr_thermal>;

__overlay__ {
cooling-maps {
map2 {
cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&radxa_poe_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
&ddr_thermal {
cooling-maps {
map2 {
cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&radxa_poe_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,12 @@
category = "misc";
description = "Disabled Zero 3W Ethernet.";
};
};

fragment@0 {
target = <&mdio1>;

__overlay__ {
status = "disabled";
};
};

fragment@1 {
target = <&gmac1>;
&mdio1 {
status = "disabled";
};

__overlay__ {
status = "disabled";
};
};
&gmac1 {
status = "disabled";
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,12 @@
category = "misc";
description = "Disabled Zero 3E Wireless.";
};
};

fragment@0 {
target = <&uart1>;

__overlay__ {
status = "disabled";
};
};

fragment@1 {
target = <&sdmmc1>;
&uart1 {
status = "disabled";
};

__overlay__ {
status = "disabled";
};
};
&sdmmc1 {
status = "disabled";
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,26 @@
exclusive = "GPIO3_D2";
description = "Enable external antenna.";
};
};

fragment@0 {
target-path = "/";

__overlay__ {
board_antenna: board-antenna {
status = "okay";
compatible = "regulator-fixed";
enable-active-low;
gpio = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
regulator-always-on;
regulator-boot-on;
pinctrl-0 = <&ant_1>;
pinctrl-names = "default";
regulator-name = "board_antenna";
};
};
&{/} {
board_antenna: board-antenna {
status = "okay";
compatible = "regulator-fixed";
enable-active-low;
gpio = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
regulator-always-on;
regulator-boot-on;
pinctrl-0 = <&ant_1>;
pinctrl-names = "default";
regulator-name = "board_antenna";
};
};

fragment@1 {
target = <&pinctrl>;

__overlay__ {
antenna {
ant_1: ant-1 {
rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
&pinctrl {
antenna {
ant_1: ant-1 {
rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
};
Loading

0 comments on commit d1d348e

Please sign in to comment.