Skip to content

Commit

Permalink
ipq60xx: add GL.iNet GL-AX1800 support
Browse files Browse the repository at this point in the history
  • Loading branch information
aiamadeus committed Jan 30, 2024
1 parent e4dedaf commit 6c52d1d
Show file tree
Hide file tree
Showing 9 changed files with 460 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

/dts-v1/;

#include "ipq6000-glinet.dtsi"

/ {
model = "GL.iNet GL-AX1800";
compatible = "glinet,gl-ax1800", "qcom,ipq6018";

aliases {
ethernet0 = &dp1;
ethernet1 = &dp2;
label-mac-device = &dp1;
};
};

&switch {
switch_lan_bmp = <0x3c>; /* lan port bitmap */
switch_wan_bmp = <0x02>; /* wan port bitmap */
};

&dp1 {
status = "okay";
phy-handle = <&qca8075_0>;
label = "wan";
};

&dp2 {
status = "okay";
phy-handle = <&qca8075_1>;
label = "lan1";
};

&dp3 {
status = "okay";
phy-handle = <&qca8075_2>;
label = "lan2";
};

&dp4 {
status = "okay";
phy-handle = <&qca8075_3>;
label = "lan3";
};

&dp5 {
status = "okay";
phy-handle = <&qca8075_4>;
label = "lan4";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

/dts-v1/;

#include "ipq6000-glinet.dtsi"

/ {
model = "GL.iNet GL-AXT1800";
compatible = "glinet,gl-axt1800", "qcom,ipq6018";

aliases {
ethernet0 = &dp1;
ethernet1 = &dp3;
label-mac-device = &dp1;
};

vcc_sd: regulator-vcc-sd {
compatible = "regulator-fixed";
regulator-name = "vcc_sd";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
gpios = <&tlmm 66 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};

vcc_fan: regulator-vcc-fan {
compatible = "regulator-fixed";
regulator-name = "vcc_fan";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&tlmm 29 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-boot-on;
};

fan: pwm-fan {
compatible = "pwm-fan";
fan-supply = <&vcc_fan>;
pwms = <&pwm 1 40000 0>;
pinctrl-0 = <&fan_pins>;
pinctrl-names = "default";
cooling-levels = <36 128 192 255>;
#cooling-cells = <2>;
};
};

&tlmm {
fan_pins: fan-pins {
speed {
pins = "gpio31";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};

pwm_pins: pwm-pins {
pwm {
pins = "gpio30";
function = "pwm13";
drive-strength = <8>;
};
};

sd_pins: sd-pins {
sd {
pins = "gpio62";
function = "sd_card";
bias-pull-up;
};
ldo {
pins = "gpio66";
function = "gpio";
bias-pull-up;
};
};
};

&pwm {
pinctrl-0 = <&pwm_pins>;
pinctrl-names = "default";
status = "okay";
};

&sdhc {
mmc-ddr-1_8v;
bus-width = <4>;
cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&sd_pins>;
pinctrl-names = "default";
vqmmc-supply = <&vcc_sd>;
status = "okay";
};

&switch {
switch_lan_bmp = <0x0c>; /* lan port bitmap */
switch_wan_bmp = <0x02>; /* wan port bitmap */
};

&dp1 {
status = "okay";
phy-handle = <&qca8075_0>;
label = "wan";
};

&dp2 {
status = "okay";
phy-handle = <&qca8075_1>;
label = "lan2";
};

&dp3 {
status = "okay";
phy-handle = <&qca8075_2>;
label = "lan1";
};
Loading

0 comments on commit 6c52d1d

Please sign in to comment.