rockchip: add support for Widora MangoPi M28C
Hardware
--------
RockChip RK3528 ARM64 (4 cores)
1/2/4GB LPDDR4 RAM
1x 1000 Base-T
1x LEDs (STATUS)
1x User button
Micro-SD Slot
2x USB 2.0 Port
1x USB 3.0 Port
1x Internal M.2 USB3.0 Port
Wi-Fi 6 + BT 5.3 (AIC8800)
USB Type-C PD/QC Power
Signed-off-by: fujr <fjrcn@outlook.com>
(cherry picked from commit 6e48b1b7af)
This commit is contained in:
@@ -184,6 +184,13 @@ define U-Boot/rk3528/Default
|
||||
TPL:=$(RK3528_TPL)
|
||||
endef
|
||||
|
||||
define U-Boot/mangopi-m28c-rk3528
|
||||
$(U-Boot/rk3528/Default)
|
||||
NAME:=MangoPi M28C
|
||||
BUILD_DEVICES:= \
|
||||
widora_mangopi-m28c
|
||||
endef
|
||||
|
||||
define U-Boot/mangopi-m28k-rk3528
|
||||
$(U-Boot/rk3528/Default)
|
||||
NAME:=MangoPi M28K
|
||||
@@ -522,6 +529,7 @@ UBOOT_TARGETS := \
|
||||
roc-cc-rk3328 \
|
||||
rock64-rk3328 \
|
||||
rock-pi-e-rk3328 \
|
||||
mangopi-m28c-rk3528 \
|
||||
mangopi-m28k-rk3528 \
|
||||
radxa-e20c-rk3528 \
|
||||
rock-2-rk3528 \
|
||||
|
||||
@@ -0,0 +1,307 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
#include "rk3528.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
mmc2 = &sdio0;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:1500000n8";
|
||||
};
|
||||
|
||||
gpio_leds: gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
status_led: led-1 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio4 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
sdio_pwrseq: sdio-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_reg_on_h>;
|
||||
post-power-on-delay-ms = <100>;
|
||||
power-off-delay-us = <5000000>;
|
||||
reset-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
vcc_1v8: regulator-1v8-vcc {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v8";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
vin-supply = <&vcc_3v3>;
|
||||
};
|
||||
|
||||
vcc_3v3: regulator-3v3-vcc {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_3v3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vcc_ddr: regulator-1v1-vcc-ddr {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_ddr";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vcc_sys: regulator-vcc-sys {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
vccio_sd: regulator-vccio-sd {
|
||||
compatible = "regulator-gpio";
|
||||
gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc_vol_ctrl_h>;
|
||||
regulator-name = "vccio_sd";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
states = <1800000 0x0>, <3300000 0x1>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vdd_0v9: regulator-0v9-vdd {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vdd_0v9";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vdd_arm: regulator-vdd-arm {
|
||||
compatible = "pwm-regulator";
|
||||
pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>;
|
||||
pwm-supply = <&vcc_sys>;
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <746000>;
|
||||
regulator-max-microvolt = <1201000>;
|
||||
regulator-settling-time-up-us = <250>;
|
||||
};
|
||||
|
||||
vdd_logic: regulator-vdd-logic {
|
||||
compatible = "pwm-regulator";
|
||||
pwms = <&pwm2 0 5000 PWM_POLARITY_INVERTED>;
|
||||
pwm-supply = <&vcc_sys>;
|
||||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <705000>;
|
||||
regulator-max-microvolt = <1006000>;
|
||||
regulator-settling-time-up-us = <250>;
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&cpu1 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&cpu2 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&cpu3 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy>;
|
||||
phy-mode = "rgmii-id";
|
||||
phy-supply = <&vcc_3v3>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii_miim>, <&rgmii_tx_bus2>, <&rgmii_rx_bus2>,
|
||||
<&rgmii_rgmii_clk>, <&rgmii_rgmii_bus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c6 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy: ethernet-phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac1_rstn_l>;
|
||||
reset-assert-us = <20000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
|
||||
leds {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
led@1 {
|
||||
reg = <1>;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
led@2 {
|
||||
reg = <2>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
default-state = "keep";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
bt {
|
||||
bt_reg_on_h: bt-reg-on-h {
|
||||
rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
bt_wake_host_h: bt-wake-host-h {
|
||||
rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
host_wake_bt_h: host-wake-bt-h {
|
||||
rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
gmac {
|
||||
gmac1_rstn_l: gmac1-rstn-l {
|
||||
rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
work_led_pin: work-led-pin {
|
||||
rockchip,pins = <4 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
sdmmc {
|
||||
sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h {
|
||||
rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
wifi {
|
||||
wifi_reg_on_h: wifi-reg-on-h {
|
||||
rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
wifi_wake_host_h: wifi-wake-host-h {
|
||||
rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pwm1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm1m0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm2m0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&vcc_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
cap-mmc-highspeed;
|
||||
mmc-hs200-1_8v;
|
||||
no-sd;
|
||||
no-sdio;
|
||||
non-removable;
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
vqmmc-supply = <&vcc_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdio0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
bus-width = <4>;
|
||||
cap-sd-highspeed;
|
||||
cap-sdio-irq;
|
||||
keep-power-in-suspend;
|
||||
mmc-pwrseq = <&sdio_pwrseq>;
|
||||
non-removable;
|
||||
sd-uhs-sdr104;
|
||||
status = "okay";
|
||||
|
||||
wifi@1 {
|
||||
reg = <1>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <RK_PA7 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "host-wake";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_wake_host_h>;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0m0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart2m1_xfer &uart2m1_ctsn &uart2m1_rtsn>;
|
||||
uart-has-rtscts;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "rk3528-mangopi-m28k-u-boot.dtsi"
|
||||
@@ -0,0 +1,46 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/thermal/thermal.h>
|
||||
|
||||
#include "rk3528-mangopi-m28.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Widora MangoPi M28C";
|
||||
compatible = "widora,mangopi-m28c", "rockchip,rk3528";
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
#size-cells = <0>;
|
||||
|
||||
modem-reset {
|
||||
gpio-export,name = "MODEM-RST";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
modem-power {
|
||||
gpio-export,name = "MODEM-PWR";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
fan: pwm-fan {
|
||||
compatible = "pwm-fan";
|
||||
cooling-levels = <0 100 150 200 255>;
|
||||
#cooling-cells = <2>;
|
||||
pwms = <&pwm3 0 1000000 0>;
|
||||
};
|
||||
};
|
||||
|
||||
&gpio_leds {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&work_led_pin>;
|
||||
};
|
||||
|
||||
&pwm3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm3m0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -1,237 +1,38 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
#include "rk3528.dtsi"
|
||||
#include "rk3528-mangopi-m28.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Widora MangoPi M28K";
|
||||
compatible = "widora,mangopi-m28k", "rockchip,rk3528";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
mmc2 = &sdio0;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:1500000n8";
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&lan_led_pin>, <&work_led_pin>, <&wan_led_pin>;
|
||||
|
||||
led-0 {
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
status_led: led-1 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio4 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led-2 {
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_WAN;
|
||||
gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
ir-receiver {
|
||||
compatible = "gpio-ir-receiver";
|
||||
gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm3_m0_ir_rx>;
|
||||
};
|
||||
|
||||
sdio_pwrseq: sdio-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_reg_on_h>;
|
||||
post-power-on-delay-ms = <100>;
|
||||
power-off-delay-us = <5000000>;
|
||||
reset-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
vcc_1v8: regulator-1v8-vcc {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v8";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
vin-supply = <&vcc_3v3>;
|
||||
};
|
||||
|
||||
vcc_3v3: regulator-3v3-vcc {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_3v3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vcc_ddr: regulator-1v1-vcc-ddr {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_ddr";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vcc_sys: regulator-vcc-sys {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
vccio_sd: regulator-vccio-sd {
|
||||
compatible = "regulator-gpio";
|
||||
gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc_vol_ctrl_h>;
|
||||
regulator-name = "vccio_sd";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
states = <1800000 0x0>, <3300000 0x1>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vdd_0v9: regulator-0v9-vdd {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vdd_0v9";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vdd_arm: regulator-vdd-arm {
|
||||
compatible = "pwm-regulator";
|
||||
pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>;
|
||||
pwm-supply = <&vcc_sys>;
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <746000>;
|
||||
regulator-max-microvolt = <1201000>;
|
||||
regulator-settling-time-up-us = <250>;
|
||||
};
|
||||
|
||||
vdd_logic: regulator-vdd-logic {
|
||||
compatible = "pwm-regulator";
|
||||
pwms = <&pwm2 0 5000 PWM_POLARITY_INVERTED>;
|
||||
pwm-supply = <&vcc_sys>;
|
||||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <705000>;
|
||||
regulator-max-microvolt = <1006000>;
|
||||
regulator-settling-time-up-us = <250>;
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&cpu1 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&cpu2 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&cpu3 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy>;
|
||||
phy-mode = "rgmii-id";
|
||||
phy-supply = <&vcc_3v3>;
|
||||
&gpio_leds {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii_miim>, <&rgmii_tx_bus2>, <&rgmii_rx_bus2>,
|
||||
<&rgmii_rgmii_clk>, <&rgmii_rgmii_bus>;
|
||||
status = "okay";
|
||||
};
|
||||
pinctrl-0 = <&lan_led_pin>, <&work_led_pin>, <&wan_led_pin>;
|
||||
|
||||
&i2c6 {
|
||||
status = "okay";
|
||||
};
|
||||
led-0 {
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy: ethernet-phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac1_rstn_l>;
|
||||
reset-assert-us = <20000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
|
||||
leds {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
led@1 {
|
||||
reg = <1>;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
led@2 {
|
||||
reg = <2>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
default-state = "keep";
|
||||
};
|
||||
};
|
||||
led-2 {
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_WAN;
|
||||
gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
bt {
|
||||
bt_reg_on_h: bt-reg-on-h {
|
||||
rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
bt_wake_host_h: bt-wake-host-h {
|
||||
rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
host_wake_bt_h: host-wake-bt-h {
|
||||
rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
gmac {
|
||||
gmac1_rstn_l: gmac1-rstn-l {
|
||||
rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
lan_led_pin: lan-led-pin {
|
||||
rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
@@ -240,10 +41,6 @@
|
||||
wan_led_pin: wan-led-pin {
|
||||
rockchip,pins = <4 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
work_led_pin: work-led-pin {
|
||||
rockchip,pins = <4 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
ir {
|
||||
@@ -257,95 +54,4 @@
|
||||
rockchip,pins = <4 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
sdmmc {
|
||||
sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h {
|
||||
rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
wifi {
|
||||
wifi_reg_on_h: wifi-reg-on-h {
|
||||
rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
wifi_wake_host_h: wifi-wake-host-h {
|
||||
rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pwm1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm1m0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm2m0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&vcc_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
cap-mmc-highspeed;
|
||||
mmc-hs200-1_8v;
|
||||
no-sd;
|
||||
no-sdio;
|
||||
non-removable;
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
vqmmc-supply = <&vcc_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdio0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
bus-width = <4>;
|
||||
cap-sd-highspeed;
|
||||
cap-sdio-irq;
|
||||
keep-power-in-suspend;
|
||||
mmc-pwrseq = <&sdio_pwrseq>;
|
||||
non-removable;
|
||||
sd-uhs-sdr104;
|
||||
status = "okay";
|
||||
|
||||
wifi@1 {
|
||||
reg = <1>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <RK_PA7 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "host-wake";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_wake_host_h>;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0m0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart2m1_xfer &uart2m1_ctsn &uart2m1_rtsn>;
|
||||
uart-has-rtscts;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
CONFIG_COUNTER_FREQUENCY=24000000
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3528-mangopi-m28c"
|
||||
CONFIG_ROCKCHIP_RK3528=y
|
||||
CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
CONFIG_DEBUG_UART_BASE=0xFF9F0000
|
||||
CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
CONFIG_DEBUG_UART=y
|
||||
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3528-mangopi-m28c.dtb"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
CONFIG_BOARD_RNG_SEED=y
|
||||
CONFIG_SPL_MAX_SIZE=0x40000
|
||||
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
CONFIG_CMD_MEMINFO=y
|
||||
CONFIG_CMD_MEMINFO_MAP=y
|
||||
CONFIG_CMD_ADC=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_MISC=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_ROCKUSB=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
CONFIG_CMD_RNG=y
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
# CONFIG_SPL_DOS_PARTITION is not set
|
||||
# CONFIG_OF_UPSTREAM is not set
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
CONFIG_BUTTON=y
|
||||
CONFIG_BUTTON_ADC=y
|
||||
CONFIG_BUTTON_GPIO=y
|
||||
# CONFIG_USB_FUNCTION_FASTBOOT is not set
|
||||
CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
CONFIG_SUPPORT_EMMC_RPMB=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
CONFIG_PHY_MOTORCOMM=y
|
||||
CONFIG_PHY_REALTEK=y
|
||||
CONFIG_DM_MDIO=y
|
||||
CONFIG_DWC_ETH_QOS=y
|
||||
CONFIG_DWC_ETH_QOS_ROCKCHIP=y
|
||||
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
|
||||
CONFIG_REGULATOR_PWM=y
|
||||
CONFIG_DM_REGULATOR_GPIO=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
CONFIG_BAUDRATE=1500000
|
||||
CONFIG_DEBUG_UART_SHIFT=2
|
||||
CONFIG_SYS_NS16550_MEM32=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_DWC3_GENERIC=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
CONFIG_USB_FUNCTION_ROCKUSB=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
@@ -105,4 +105,7 @@ radxa,e52c)
|
||||
set_interface_core 10 "lan"
|
||||
set_interface_core 20 "wan"
|
||||
;;
|
||||
widora,mangopi-m28c)
|
||||
set_interface_core 2 "eth0"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -0,0 +1,349 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
#include "rk3528.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
mmc2 = &sdio0;
|
||||
serial0 = &uart0;
|
||||
|
||||
led-boot = &status_led;
|
||||
led-failsafe = &status_led;
|
||||
led-running = &status_led;
|
||||
led-upgrade = &status_led;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:1500000n8";
|
||||
};
|
||||
|
||||
gpio_leds: gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
status_led: led-1 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio4 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
sdio_pwrseq: sdio-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_reg_on_h>;
|
||||
post-power-on-delay-ms = <100>;
|
||||
power-off-delay-us = <5000000>;
|
||||
reset-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
vcc_1v8: regulator-1v8-vcc {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v8";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
vin-supply = <&vcc_3v3>;
|
||||
};
|
||||
|
||||
vcc_3v3: regulator-3v3-vcc {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_3v3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vcc_ddr: regulator-1v1-vcc-ddr {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_ddr";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vcc_sys: regulator-vcc-sys {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
vccio_sd: regulator-vccio-sd {
|
||||
compatible = "regulator-gpio";
|
||||
gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc_vol_ctrl_h>;
|
||||
regulator-name = "vccio_sd";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
states = <1800000 0x0>, <3300000 0x1>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vdd_0v9: regulator-0v9-vdd {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vdd_0v9";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vdd_arm: regulator-vdd-arm {
|
||||
compatible = "pwm-regulator";
|
||||
pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>;
|
||||
pwm-supply = <&vcc_sys>;
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <746000>;
|
||||
regulator-max-microvolt = <1201000>;
|
||||
regulator-settling-time-up-us = <250>;
|
||||
};
|
||||
|
||||
vdd_logic: regulator-vdd-logic {
|
||||
compatible = "pwm-regulator";
|
||||
pwms = <&pwm2 0 5000 PWM_POLARITY_INVERTED>;
|
||||
pwm-supply = <&vcc_sys>;
|
||||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <705000>;
|
||||
regulator-max-microvolt = <1006000>;
|
||||
regulator-settling-time-up-us = <250>;
|
||||
};
|
||||
};
|
||||
|
||||
&combphy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&cpu1 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&cpu2 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&cpu3 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy>;
|
||||
phy-mode = "rgmii-id";
|
||||
phy-supply = <&vcc_3v3>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii_miim>, <&rgmii_tx_bus2>, <&rgmii_rx_bus2>,
|
||||
<&rgmii_rgmii_clk>, <&rgmii_rgmii_bus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&vdd_logic>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c6 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy: ethernet-phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac1_rstn_l>;
|
||||
reset-assert-us = <20000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
|
||||
leds {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
led@1 {
|
||||
reg = <1>;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
led@2 {
|
||||
reg = <2>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
default-state = "keep";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
bt {
|
||||
bt_reg_on_h: bt-reg-on-h {
|
||||
rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
bt_wake_host_h: bt-wake-host-h {
|
||||
rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
host_wake_bt_h: host-wake-bt-h {
|
||||
rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
gmac {
|
||||
gmac1_rstn_l: gmac1-rstn-l {
|
||||
rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
work_led_pin: work-led-pin {
|
||||
rockchip,pins = <4 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
sdmmc {
|
||||
sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h {
|
||||
rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
wifi {
|
||||
wifi_reg_on_h: wifi-reg-on-h {
|
||||
rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
wifi_wake_host_h: wifi-wake-host-h {
|
||||
rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pwm1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm1m0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm2m0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&vcc_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
cap-mmc-highspeed;
|
||||
mmc-hs200-1_8v;
|
||||
no-sd;
|
||||
no-sdio;
|
||||
non-removable;
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
vqmmc-supply = <&vcc_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdio0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
bus-width = <4>;
|
||||
cap-sd-highspeed;
|
||||
cap-sdio-irq;
|
||||
keep-power-in-suspend;
|
||||
mmc-pwrseq = <&sdio_pwrseq>;
|
||||
non-removable;
|
||||
sd-uhs-sdr104;
|
||||
status = "okay";
|
||||
|
||||
wifi@1 {
|
||||
reg = <1>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <RK_PA7 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "host-wake";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_wake_host_h>;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0m0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart2m1_xfer &uart2m1_ctsn &uart2m1_rtsn>;
|
||||
uart-has-rtscts;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
dr_mode = "host";
|
||||
extcon = <&usb2phy>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy_host {
|
||||
phy-supply = <&vcc_sys>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy_otg {
|
||||
phy-supply = <&vcc_sys>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -0,0 +1,101 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/thermal/thermal.h>
|
||||
|
||||
#include "rk3528-mangopi-m28.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Widora MangoPi M28C";
|
||||
compatible = "widora,mangopi-m28c", "rockchip,rk3528";
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
#size-cells = <0>;
|
||||
|
||||
modem-reset {
|
||||
gpio-export,name = "MODEM-RST";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
modem-power {
|
||||
gpio-export,name = "MODEM-PWR";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
fan: pwm-fan {
|
||||
compatible = "pwm-fan";
|
||||
cooling-levels = <0 100 150 200 255>;
|
||||
#cooling-cells = <2>;
|
||||
pwms = <&pwm3 0 1000000 0>;
|
||||
};
|
||||
};
|
||||
|
||||
&gpio_leds {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&work_led_pin>;
|
||||
};
|
||||
|
||||
&pwm3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm3m0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&soc_thermal {
|
||||
trips {
|
||||
cpu_passive: trip-cpu-passive {
|
||||
temperature = <45000>;
|
||||
hysteresis = <2000>;
|
||||
type = "active";
|
||||
};
|
||||
|
||||
cpu_active: trip-cpu-active {
|
||||
temperature = <55000>;
|
||||
hysteresis = <2000>;
|
||||
type = "active";
|
||||
};
|
||||
|
||||
cpu_warm: trip-cpu-warm {
|
||||
temperature = <65000>;
|
||||
hysteresis = <2000>;
|
||||
type = "active";
|
||||
};
|
||||
|
||||
cpu_hot: trip-cpu-hot {
|
||||
temperature = <75000>;
|
||||
hysteresis = <2000>;
|
||||
type = "active";
|
||||
};
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
map-cpu-passive {
|
||||
trip = <&cpu_passive>;
|
||||
cooling-device = <&fan THERMAL_NO_LIMIT 1>;
|
||||
};
|
||||
|
||||
map-cpu-active {
|
||||
trip = <&cpu_active>;
|
||||
cooling-device = <&fan 1 2>;
|
||||
};
|
||||
|
||||
map-cpu-warm {
|
||||
trip = <&cpu_warm>;
|
||||
cooling-device = <&fan 2 3>;
|
||||
};
|
||||
|
||||
map-cpu-hot {
|
||||
trip = <&cpu_hot>;
|
||||
cooling-device = <&fan 3 THERMAL_NO_LIMIT>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
phys = <&usb2phy_otg>, <&combphy PHY_TYPE_USB3>;
|
||||
phy-names = "usb2-phy", "usb3-phy";
|
||||
};
|
||||
@@ -1,227 +1,34 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
#include "rk3528.dtsi"
|
||||
#include "rk3528-mangopi-m28.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Widora MangoPi M28K";
|
||||
compatible = "widora,mangopi-m28k", "rockchip,rk3528";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc;
|
||||
mmc2 = &sdio0;
|
||||
serial0 = &uart0;
|
||||
|
||||
led-boot = &status_led;
|
||||
led-failsafe = &status_led;
|
||||
led-running = &status_led;
|
||||
led-upgrade = &status_led;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:1500000n8";
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&lan_led_pin>, <&work_led_pin>, <&wan_led_pin>;
|
||||
|
||||
led-0 {
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
status_led: led-1 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio4 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led-2 {
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_WAN;
|
||||
gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
ir-receiver {
|
||||
compatible = "gpio-ir-receiver";
|
||||
gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm3_m0_ir_rx>;
|
||||
};
|
||||
|
||||
sdio_pwrseq: sdio-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_reg_on_h>;
|
||||
post-power-on-delay-ms = <100>;
|
||||
power-off-delay-us = <5000000>;
|
||||
reset-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
vcc_1v8: regulator-1v8-vcc {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v8";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
vin-supply = <&vcc_3v3>;
|
||||
};
|
||||
|
||||
vcc_3v3: regulator-3v3-vcc {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_3v3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vcc_ddr: regulator-1v1-vcc-ddr {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_ddr";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vcc_sys: regulator-vcc-sys {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
vccio_sd: regulator-vccio-sd {
|
||||
compatible = "regulator-gpio";
|
||||
gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc_vol_ctrl_h>;
|
||||
regulator-name = "vccio_sd";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
states = <1800000 0x0>, <3300000 0x1>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vdd_0v9: regulator-0v9-vdd {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vdd_0v9";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vdd_arm: regulator-vdd-arm {
|
||||
compatible = "pwm-regulator";
|
||||
pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>;
|
||||
pwm-supply = <&vcc_sys>;
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <746000>;
|
||||
regulator-max-microvolt = <1201000>;
|
||||
regulator-settling-time-up-us = <250>;
|
||||
};
|
||||
|
||||
vdd_logic: regulator-vdd-logic {
|
||||
compatible = "pwm-regulator";
|
||||
pwms = <&pwm2 0 5000 PWM_POLARITY_INVERTED>;
|
||||
pwm-supply = <&vcc_sys>;
|
||||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <705000>;
|
||||
regulator-max-microvolt = <1006000>;
|
||||
regulator-settling-time-up-us = <250>;
|
||||
};
|
||||
};
|
||||
|
||||
&combphy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&cpu1 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&cpu2 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&cpu3 {
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
clock_in_out = "output";
|
||||
phy-handle = <&rgmii_phy>;
|
||||
phy-mode = "rgmii-id";
|
||||
phy-supply = <&vcc_3v3>;
|
||||
&gpio_leds {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii_miim>, <&rgmii_tx_bus2>, <&rgmii_rx_bus2>,
|
||||
<&rgmii_rgmii_clk>, <&rgmii_rgmii_bus>;
|
||||
status = "okay";
|
||||
};
|
||||
pinctrl-0 = <&lan_led_pin>, <&work_led_pin>, <&wan_led_pin>;
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&vdd_logic>;
|
||||
status = "okay";
|
||||
};
|
||||
led-0 {
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
&i2c6 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy: ethernet-phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac1_rstn_l>;
|
||||
reset-assert-us = <20000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
|
||||
leds {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
led@1 {
|
||||
reg = <1>;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
default-state = "keep";
|
||||
};
|
||||
|
||||
led@2 {
|
||||
reg = <2>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
default-state = "keep";
|
||||
};
|
||||
};
|
||||
led-2 {
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_WAN;
|
||||
gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -248,26 +55,6 @@
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
bt {
|
||||
bt_reg_on_h: bt-reg-on-h {
|
||||
rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
bt_wake_host_h: bt-wake-host-h {
|
||||
rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
host_wake_bt_h: host-wake-bt-h {
|
||||
rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
gmac {
|
||||
gmac1_rstn_l: gmac1-rstn-l {
|
||||
rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
lan_led_pin: lan-led-pin {
|
||||
rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
@@ -276,10 +63,6 @@
|
||||
wan_led_pin: wan-led-pin {
|
||||
rockchip,pins = <4 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
work_led_pin: work-led-pin {
|
||||
rockchip,pins = <4 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
ir {
|
||||
@@ -293,127 +76,11 @@
|
||||
rockchip,pins = <4 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
sdmmc {
|
||||
sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h {
|
||||
rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
wifi {
|
||||
wifi_reg_on_h: wifi-reg-on-h {
|
||||
rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
wifi_wake_host_h: wifi-wake-host-h {
|
||||
rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pwm1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm1m0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm2m0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&vcc_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
cap-mmc-highspeed;
|
||||
mmc-hs200-1_8v;
|
||||
no-sd;
|
||||
no-sdio;
|
||||
non-removable;
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
vqmmc-supply = <&vcc_1v8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdio0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
bus-width = <4>;
|
||||
cap-sd-highspeed;
|
||||
cap-sdio-irq;
|
||||
keep-power-in-suspend;
|
||||
mmc-pwrseq = <&sdio_pwrseq>;
|
||||
non-removable;
|
||||
sd-uhs-sdr104;
|
||||
status = "okay";
|
||||
|
||||
wifi@1 {
|
||||
reg = <1>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <RK_PA7 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "host-wake";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_wake_host_h>;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3>;
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0m0_xfer>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart2m1_xfer &uart2m1_ctsn &uart2m1_rtsn>;
|
||||
uart-has-rtscts;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
dr_mode = "host";
|
||||
extcon = <&usb2phy>;
|
||||
maximum-speed = "high-speed";
|
||||
phys = <&usb2phy_otg>;
|
||||
phy-names = "usb2-phy";
|
||||
snps,dis_u2_susphy_quirk;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy_host {
|
||||
phy-supply = <&vcc_sys>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy_otg {
|
||||
phy-supply = <&vcc_sys>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -572,6 +572,14 @@ define Device/sinovoip_bpi-r2-pro
|
||||
endef
|
||||
TARGET_DEVICES += sinovoip_bpi-r2-pro
|
||||
|
||||
define Device/widora_mangopi-m28c
|
||||
$(Device/rk3528)
|
||||
DEVICE_VENDOR := Widora
|
||||
DEVICE_MODEL := MangoPi M28C
|
||||
DEVICE_PACKAGES := kmod-aic8800-sdio wpad-openssl kmod-hwmon-pwmfan
|
||||
endef
|
||||
TARGET_DEVICES += widora_mangopi-m28c
|
||||
|
||||
define Device/widora_mangopi-m28k
|
||||
$(Device/rk3528)
|
||||
DEVICE_VENDOR := Widora
|
||||
|
||||
Reference in New Issue
Block a user