Skip to content

Commit

Permalink
rockchip: add h68k/h69k hardware v3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
aiamadeus committed Jul 24, 2023
1 parent 279cda2 commit 266036e
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 76 deletions.
4 changes: 3 additions & 1 deletion target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ friendlyarm,nanopi-r5s)
ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth2"
;;
hinlink,opc-h66k|\
hinlink,opc-h68k|\
hinlink,opc-h69k)
ucidef_set_led_netdev "wan" "WAN" "blue:net" "eth0"
;;
hinlink,opc-h68k)
ucidef_set_led_netdev "wan" "WAN" "blue:net" "eth1"
;;
esac

board_config_flush
Expand Down
7 changes: 2 additions & 5 deletions target/linux/rockchip/armv8/base-files/etc/board.d/02_network
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,18 @@ rockchip_setup_interfaces()
xunlong,orangepi-r1-plus-lts)
ucidef_set_interfaces_lan_wan 'eth1' 'eth0'
;;
hinlink,opc-h68k|\
hinlink,opc-h69k)
ucidef_set_interfaces_lan_wan 'eth1 eth2 eth3' 'eth0'
;;
fastrhino,r66s|\
firefly,rk3568-roc-pc|\
friendlyarm,nanopi-r5c|\
radxa,e25)
ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
;;
hinlink,opc-h68k|\
fastrhino,r68s|\
lyt,t68m)
ucidef_set_interfaces_lan_wan 'eth0 eth2 eth3' 'eth1'
;;
hinlink,opc-h69k|\
friendlyarm,nanopi-r5s)
ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
;;
Expand Down Expand Up @@ -101,7 +99,6 @@ rockchip_setup_macs()
;;
friendlyarm,nanopi-r5c|\
friendlyarm,nanopi-r5s|\
panther,x2|\
sharevdi,guangmiao-g4c)
wan_mac=$(macaddr_generate_from_mmc_cid mmcblk1)
lan_mac=$(macaddr_add "$wan_mac" +1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,15 @@
};

&mdio0 {
rgmii_phy0: phy@0 {
compatible = "ethernet-phy-id001c.c916",
"ethernet-phy-ieee802.3-c22";
rgmii_phy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
};
};

&mdio1 {
rgmii_phy1: phy@0 {
compatible = "ethernet-phy-id001c.c916",
"ethernet-phy-ieee802.3-c22";
rgmii_phy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
compatible = "hinlink,opc-h69k", "rockchip,rk3568";

aliases {
ethernet0 = &gmac0;
ethernet1 = &gmac1;
ethernet0 = &gmac1;
};

vcc5v0_ahci: vcc5v0-ahci {
Expand All @@ -28,27 +27,6 @@
};
};

&gmac0 {
assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
assigned-clock-rates = <0>, <125000000>;
clock_in_out = "output";
phy-mode = "rgmii-id";
pinctrl-names = "default";
pinctrl-0 = <&gmac0_miim
&gmac0_tx_bus2
&gmac0_rx_bus2
&gmac0_rgmii_clk
&gmac0_rgmii_bus>;
snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
snps,reset-delays-us = <0 20000 100000>;
tx_delay = <0x3c>;
rx_delay = <0x2f>;
phy-handle = <&rgmii_phy0>;
status = "okay";
};

&gmac1 {
assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
Expand All @@ -70,18 +48,9 @@
status = "okay";
};

&mdio0 {
rgmii_phy0: phy@0 {
compatible = "ethernet-phy-id001c.c916",
"ethernet-phy-ieee802.3-c22";
reg = <0x0>;
};
};

&mdio1 {
rgmii_phy1: phy@0 {
compatible = "ethernet-phy-id001c.c916",
"ethernet-phy-ieee802.3-c22";
rgmii_phy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
};
};
Expand Down
60 changes: 30 additions & 30 deletions target/linux/rockchip/image/armv8.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,35 +52,6 @@ define Device/ezpro_mrkaio-m68s-plus
endef
TARGET_DEVICES += ezpro_mrkaio-m68s-plus

define Device/hinlink_common
DEVICE_VENDOR := HINLINK
UBOOT_DEVICE_NAME := opc-h68k-rk3568
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := kmod-ata-ahci-platform kmod-hwmon-pwmfan kmod-mt7921e kmod-r8125 wpad-openssl
endef

define Device/hinlink_opc-h66k
$(call Device/hinlink_common)
DEVICE_MODEL := OPC-H66K
SOC := rk3568
endef
TARGET_DEVICES += hinlink_opc-h66k

define Device/hinlink_opc-h68k
$(call Device/hinlink_common)
DEVICE_MODEL := OPC-H68K
SOC := rk3568
endef
TARGET_DEVICES += hinlink_opc-h68k

define Device/hinlink_opc-h69k
$(call Device/hinlink_common)
DEVICE_MODEL := OPC-H69K
SOC := rk3568
DEVICE_PACKAGES += kmod-usb-serial-option uqmi
endef
TARGET_DEVICES += hinlink_opc-h69k

define Device/fastrhino_common
DEVICE_VENDOR := FastRhino
SOC := rk3568
Expand Down Expand Up @@ -180,13 +151,42 @@ define Device/firefly_station-p2
endef
TARGET_DEVICES += firefly_station-p2

define Device/hinlink_common
DEVICE_VENDOR := HINLINK
UBOOT_DEVICE_NAME := opc-h68k-rk3568
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := kmod-ata-ahci-platform kmod-hwmon-pwmfan kmod-mt7921e kmod-r8125 wpad-openssl
endef

define Device/hinlink_opc-h66k
$(call Device/hinlink_common)
DEVICE_MODEL := OPC-H66K
SOC := rk3568
endef
TARGET_DEVICES += hinlink_opc-h66k

define Device/hinlink_opc-h68k
$(call Device/hinlink_common)
DEVICE_MODEL := OPC-H68K
SOC := rk3568
endef
TARGET_DEVICES += hinlink_opc-h68k

define Device/hinlink_opc-h69k
$(call Device/hinlink_common)
DEVICE_MODEL := OPC-H69K
SOC := rk3568
DEVICE_PACKAGES += kmod-mt7916-firmware kmod-usb-serial-option uqmi
endef
TARGET_DEVICES += hinlink_opc-h69k

define Device/lyt_t68m
DEVICE_VENDOR := LYT
DEVICE_MODEL := T68M
SOC := rk3568
UBOOT_DEVICE_NAME := lyt-t68m-rk3568
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r5s | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := kmod-r8125 wpad-openssl kmod-mt7921-firmware kmod-mt7922-firmware kmod-mt7921e kmod-mt7916-firmware
DEVICE_PACKAGES := kmod-mt7921e kmod-r8125 wpad-openssl
endef
TARGET_DEVICES += lyt_t68m

Expand Down

0 comments on commit 266036e

Please sign in to comment.