diff --git a/patch/u-boot/u-boot-sunxi/board_bigtreetech-cb1/allwinner-h616-driver-i2c3.patch b/patch/u-boot/u-boot-sunxi/board_bigtreetech-cb1/allwinner-h616-driver-i2c3.patch new file mode 100644 index 0000000000..1ed1015e47 --- /dev/null +++ b/patch/u-boot/u-boot-sunxi/board_bigtreetech-cb1/allwinner-h616-driver-i2c3.patch @@ -0,0 +1,92 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: JohnTheCoolingFan +Date: Fri, 9 Aug 2024 07:14:37 +0000 +Subject: Allwinner H616: driver: I2C3 + +Signed-off-by: JohnTheCoolingFan +--- + arch/arm/include/asm/arch-sunxi/i2c.h | 3 + + arch/arm/mach-sunxi/Kconfig | 9 +++ + board/sunxi/board.c | 12 +++++ + 3 files changed, 24 insertions(+) + +diff --git a/arch/arm/include/asm/arch-sunxi/i2c.h b/arch/arm/include/asm/arch-sunxi/i2c.h +index f0da46d863c..98c26d7408e 100644 +--- a/arch/arm/include/asm/arch-sunxi/i2c.h ++++ b/arch/arm/include/asm/arch-sunxi/i2c.h +@@ -11,10 +11,13 @@ + #define CFG_I2C_MVTWSI_BASE0 SUNXI_TWI0_BASE + #endif + #ifdef CONFIG_I2C1_ENABLE + #define CFG_I2C_MVTWSI_BASE1 SUNXI_TWI1_BASE + #endif ++#ifdef CONFIG_I2C3_ENABLE ++#define CONFIG_I2C_MVTWSI_BASE3 SUNXI_TWI3_BASE ++#endif + #ifdef CONFIG_R_I2C_ENABLE + #define CFG_I2C_MVTWSI_BASE2 SUNXI_R_TWI_BASE + #endif + + /* This is abp0-clk on sun4i/5i/7i / abp1-clk on sun6i/sun8i which is 24MHz */ +diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig +index d91faf9ab13..59cd48653c3 100644 +--- a/arch/arm/mach-sunxi/Kconfig ++++ b/arch/arm/mach-sunxi/Kconfig +@@ -807,10 +807,19 @@ config I2C1_ENABLE + bool "Enable I2C/TWI controller 1" + select CMD_I2C + ---help--- + See I2C0_ENABLE help text. + ++if MACH_SUN50I_H616 ++config I2C3_ENABLE ++ bool "Enable I2C/TWI controller 3" ++ default n ++ select CMD_I2C ++ ---help--- ++ See I2C0_ENABLE help text. ++endif ++ + if SUNXI_GEN_SUN6I || SUN50I_GEN_H6 + config R_I2C_ENABLE + bool "Enable the PRCM I2C/TWI controller" + # This is used for the pmic on H3 + default y if SY8106A_POWER +diff --git a/board/sunxi/board.c b/board/sunxi/board.c +index 2163fac5e06..302a927f524 100644 +--- a/board/sunxi/board.c ++++ b/board/sunxi/board.c +@@ -13,10 +13,11 @@ + #include + #include + #include + #include + #include ++#include + #include + #include + #include + #include + #include +@@ -107,10 +108,21 @@ void i2c_init_board(void) + sunxi_gpio_set_cfgpin(SUNXI_GPH(3), SUN50I_GPH_TWI1); + clock_twi_onoff(1, 1); + #endif + #endif + ++#ifdef CONFIG_I2C3_ENABLE ++#if defined(CONFIG_MACH_SUN50I_H616) ++ sunxi_gpio_set_cfgpin(SUNXI_GPA(10), 2); ++ sunxi_gpio_set_cfgpin(SUNXI_GPA(11), 2); ++ sunxi_gpio_set_cfgpin(SUNXI_GPA(12), 2); ++ sunxi_gpio_set_pull(SUNXI_GPA(10), SUNXI_GPIO_PULL_UP); ++ sunxi_gpio_set_pull(SUNXI_GPA(11), SUNXI_GPIO_PULL_UP); ++ clock_twi_onoff(3, 1); ++#endif ++#endif ++ + #ifdef CONFIG_R_I2C_ENABLE + #ifdef CONFIG_MACH_SUN50I + clock_twi_onoff(5, 1); + sunxi_gpio_set_cfgpin(SUNXI_GPL(8), SUN50I_GPL_R_TWI); + sunxi_gpio_set_cfgpin(SUNXI_GPL(9), SUN50I_GPL_R_TWI); diff --git a/patch/u-boot/u-boot-sunxi/board_bigtreetech-cb1/allwinner-h616-dts-enable-internal-phy-emac1.patch b/patch/u-boot/u-boot-sunxi/board_bigtreetech-cb1/allwinner-h616-dts-enable-internal-phy-emac1.patch new file mode 100644 index 0000000000..91cb865d33 --- /dev/null +++ b/patch/u-boot/u-boot-sunxi/board_bigtreetech-cb1/allwinner-h616-dts-enable-internal-phy-emac1.patch @@ -0,0 +1,117 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: JohnTheCoolingFan +Date: Fri, 9 Aug 2024 07:14:37 +0000 +Subject: Allwinner H616 DTS: Enable internal PHY (EMAC1) + +Signed-off-by: JohnTheCoolingFan +--- + arch/arm/dts/sun50i-h616.dtsi | 27 +++++++++ + drivers/net/sun8i_emac.c | 7 +++ + drivers/pinctrl/sunxi/pinctrl-sunxi.c | 1 + + 3 files changed, 35 insertions(+) + +diff --git a/arch/arm/dts/sun50i-h616.dtsi b/arch/arm/dts/sun50i-h616.dtsi +index 46651703e9b..87d62cb1d3f 100644 +--- a/arch/arm/dts/sun50i-h616.dtsi ++++ b/arch/arm/dts/sun50i-h616.dtsi +@@ -207,10 +207,18 @@ + function = "mmc2"; + drive-strength = <40>; + bias-pull-up; + }; + ++ /omit-if-no-ref/ ++ rmii_pins: rmii-pins { ++ pins = "PA0", "PA1", "PA2", "PA3", "PA4", ++ "PA5", "PA6", "PA7", "PA8", "PA9"; ++ function = "emac1"; ++ drive-strength = <40>; ++ }; ++ + /omit-if-no-ref/ + spi0_pins: spi0-pins { + pins = "PC0", "PC2", "PC4"; + function = "spi0"; + }; +@@ -502,10 +510,29 @@ + #address-cells = <1>; + #size-cells = <0>; + }; + }; + ++ emac1: ethernet@5030000 { ++ compatible = "allwinner,sun50i-h616-emac1"; ++ syscon = <&syscon 1>; ++ reg = <0x05030000 0x10000>; ++ interrupts = ; ++ interrupt-names = "macirq"; ++ resets = <&ccu RST_BUS_EMAC1>; ++ reset-names = "stmmaceth"; ++ clocks = <&ccu CLK_BUS_EMAC1>; ++ clock-names = "stmmaceth"; ++ status = "disabled"; ++ ++ mdio1: mdio { ++ compatible = "snps,dwmac-mdio"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ }; ++ + usbotg: usb@5100000 { + compatible = "allwinner,sun50i-h616-musb", + "allwinner,sun8i-h3-musb"; + reg = <0x05100000 0x0400>; + clocks = <&ccu CLK_BUS_OTG>; +diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c +index a12f7e32e8f..98804029719 100644 +--- a/drivers/net/sun8i_emac.c ++++ b/drivers/net/sun8i_emac.c +@@ -904,10 +904,15 @@ static const struct emac_variant emac_variant_a64 = { + static const struct emac_variant emac_variant_h6 = { + .syscon_offset = 0x30, + .support_rmii = true, + }; + ++static const struct emac_variant emac_variant_h616_1 = { ++ .syscon_offset = 0x34, ++ .support_rmii = true, ++}; ++ + static const struct udevice_id sun8i_emac_eth_ids[] = { + { .compatible = "allwinner,sun8i-a83t-emac", + .data = (ulong)&emac_variant_a83t }, + { .compatible = "allwinner,sun8i-h3-emac", + .data = (ulong)&emac_variant_h3 }, +@@ -915,10 +920,12 @@ static const struct udevice_id sun8i_emac_eth_ids[] = { + .data = (ulong)&emac_variant_r40 }, + { .compatible = "allwinner,sun50i-a64-emac", + .data = (ulong)&emac_variant_a64 }, + { .compatible = "allwinner,sun50i-h6-emac", + .data = (ulong)&emac_variant_h6 }, ++ { .compatible = "allwinner,sun50i-h616-emac1", ++ .data = (ulong)&emac_variant_h616_1 }, + { } + }; + + U_BOOT_DRIVER(eth_sun8i_emac) = { + .name = "eth_sun8i_emac", +diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c +index 37ea93715d1..a9c3bf05702 100644 +--- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c ++++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c +@@ -735,10 +735,11 @@ static const struct sunxi_pinctrl_desc __maybe_unused sun50i_h6_r_pinctrl_desc = + .num_banks = 2, + }; + + static const struct sunxi_pinctrl_function sun50i_h616_pinctrl_functions[] = { + { "emac0", 2 }, /* PI0-PI16 */ ++ { "emac1", 2 }, /* PA0-PA9 */ + { "gpio_in", 0 }, + { "gpio_out", 1 }, + { "mmc0", 2 }, /* PF0-PF5 */ + { "mmc1", 2 }, /* PG0-PG5 */ + { "mmc2", 3 }, /* PC0-PC16 */ +-- +Created with Armbian build tools https://github.com/armbian/build + diff --git a/patch/u-boot/u-boot-sunxi/board_bigtreetech-cb1/allwinner-h616-setup-internal-phy-emac1.patch b/patch/u-boot/u-boot-sunxi/board_bigtreetech-cb1/allwinner-h616-setup-internal-phy-emac1.patch new file mode 100644 index 0000000000..b9dfe8b12a --- /dev/null +++ b/patch/u-boot/u-boot-sunxi/board_bigtreetech-cb1/allwinner-h616-setup-internal-phy-emac1.patch @@ -0,0 +1,93 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: JohnTheCoolingFan +Date: Fri, 9 Aug 2024 07:14:37 +0000 +Subject: Allwinner H616: Setup internal PHY (EMAC1) + +Signed-off-by: JohnTheCoolingFan +--- + arch/arm/mach-sunxi/board.c | 1 + + arch/arm/mach-sunxi/clock_sun50i_h6.c | 4 ++ + board/sunxi/board.c | 18 ++++++ + drivers/net/sun8i_emac.c | 7 +++ + drivers/pinctrl/sunxi/pinctrl-sunxi.c | 1 + + 8 files changed, 82 insertions(+) + +diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c +index 7d2d5d478fc..ca084bddda0 100644 +--- a/arch/arm/mach-sunxi/board.c ++++ b/arch/arm/mach-sunxi/board.c +@@ -479,10 +479,11 @@ void board_init_f(ulong dummy) + + #if CONFIG_IS_ENABLED(I2C) && CONFIG_IS_ENABLED(SYS_I2C_LEGACY) + /* Needed early by sunxi_board_init if PMU is enabled */ + i2c_init_board(); + i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); ++ i2c_set_bus_num(0); + #endif + sunxi_board_init(); + } + #endif /* CONFIG_SPL_BUILD */ + +diff --git a/arch/arm/mach-sunxi/clock_sun50i_h6.c b/arch/arm/mach-sunxi/clock_sun50i_h6.c +index 7f60b8c79fc..8c97ddb66c4 100644 +--- a/arch/arm/mach-sunxi/clock_sun50i_h6.c ++++ b/arch/arm/mach-sunxi/clock_sun50i_h6.c +@@ -51,10 +51,14 @@ void clock_init_safe(void) + /* + * The mux and factor are set, but the clock will be enabled in + * DRAM initialization code. + */ + writel(MBUS_CLK_SRC_PLL6X2 | MBUS_CLK_M(3), &ccm->mbus_cfg); ++ ++ writel(0x10001, 0x030017ac); ++ writel(0x50, 0x0300a028); ++ writel(0x20, 0x0300a040); + } + #endif + + void clock_init_uart(void) + { +diff --git a/board/sunxi/board.c b/board/sunxi/board.c +index 2163fac5e06..302a927f524 100644 +--- a/board/sunxi/board.c ++++ b/board/sunxi/board.c +@@ -568,10 +580,11 @@ static void sunxi_spl_store_dram_size(phys_addr_t dram_size) + } + + void sunxi_board_init(void) + { + int power_failed = 0; ++ u8 data[2]; + + #ifdef CONFIG_LED_STATUS + if (IS_ENABLED(CONFIG_SPL_DRIVERS_MISC)) + status_led_init(); + #endif +@@ -658,10 +671,27 @@ void sunxi_board_init(void) + */ + if (!power_failed) + clock_set_pll1(get_board_sys_clk()); + else + printf("Failed to set core voltage! Can't set CPU frequency\n"); ++ ++ i2c_set_bus_num(1); ++ data[0] = 0; ++ data[1] = 1; ++ i2c_write(0x10, 0xfe, 1, data, 2); ++ i2c_write(0x10, 2, 1, data, 2); ++ data[1] = 1; ++ i2c_write(0x10, 2, 1, data, 2); ++ data[1] = 0xf; ++ i2c_write(0x10, 0x16, 1, data, 2); ++ data[1] = 3; ++ i2c_write(0x10, 0x14, 1, data, 2); ++ data[1] = 0x60; ++ i2c_write(0x10, 0xfe, 1, data, 2); ++ data[0] = 0x08; ++ data[1] = 0x14; ++ i2c_write(0x10, 0, 1, data, 2); + } + #endif /* CONFIG_SPL_BUILD */ + + #ifdef CONFIG_USB_GADGET + int g_dnl_board_usb_cable_connected(void) diff --git a/patch/u-boot/u-boot-sunxi/board_bigtreetech-cb1/allwinner-sun50i-h616-enable-internal-phy-emac1.patch b/patch/u-boot/u-boot-sunxi/board_bigtreetech-cb1/allwinner-sun50i-h616-enable-internal-phy-emac1.patch deleted file mode 100644 index a867f8bd22..0000000000 --- a/patch/u-boot/u-boot-sunxi/board_bigtreetech-cb1/allwinner-sun50i-h616-enable-internal-phy-emac1.patch +++ /dev/null @@ -1,277 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: JohnTheCoolingFan -Date: Fri, 9 Aug 2024 07:14:37 +0000 -Subject: Enable H616 Internal PHY (emac1) - -Signed-off-by: JohnTheCoolingFan ---- - arch/arm/dts/sun50i-h616.dtsi | 27 +++++++++ - arch/arm/include/asm/arch-sunxi/i2c.h | 3 + - arch/arm/mach-sunxi/Kconfig | 9 +++ - arch/arm/mach-sunxi/board.c | 1 + - arch/arm/mach-sunxi/clock_sun50i_h6.c | 4 ++ - board/sunxi/board.c | 30 ++++++++++ - drivers/net/sun8i_emac.c | 7 +++ - drivers/pinctrl/sunxi/pinctrl-sunxi.c | 1 + - 8 files changed, 82 insertions(+) - -diff --git a/arch/arm/dts/sun50i-h616.dtsi b/arch/arm/dts/sun50i-h616.dtsi -index 46651703e9b..87d62cb1d3f 100644 ---- a/arch/arm/dts/sun50i-h616.dtsi -+++ b/arch/arm/dts/sun50i-h616.dtsi -@@ -207,10 +207,18 @@ - function = "mmc2"; - drive-strength = <40>; - bias-pull-up; - }; - -+ /omit-if-no-ref/ -+ rmii_pins: rmii-pins { -+ pins = "PA0", "PA1", "PA2", "PA3", "PA4", -+ "PA5", "PA6", "PA7", "PA8", "PA9"; -+ function = "emac1"; -+ drive-strength = <40>; -+ }; -+ - /omit-if-no-ref/ - spi0_pins: spi0-pins { - pins = "PC0", "PC2", "PC4"; - function = "spi0"; - }; -@@ -502,10 +510,29 @@ - #address-cells = <1>; - #size-cells = <0>; - }; - }; - -+ emac1: ethernet@5030000 { -+ compatible = "allwinner,sun50i-h616-emac1"; -+ syscon = <&syscon 1>; -+ reg = <0x05030000 0x10000>; -+ interrupts = ; -+ interrupt-names = "macirq"; -+ resets = <&ccu RST_BUS_EMAC1>; -+ reset-names = "stmmaceth"; -+ clocks = <&ccu CLK_BUS_EMAC1>; -+ clock-names = "stmmaceth"; -+ status = "disabled"; -+ -+ mdio1: mdio { -+ compatible = "snps,dwmac-mdio"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ }; -+ }; -+ - usbotg: usb@5100000 { - compatible = "allwinner,sun50i-h616-musb", - "allwinner,sun8i-h3-musb"; - reg = <0x05100000 0x0400>; - clocks = <&ccu CLK_BUS_OTG>; -diff --git a/arch/arm/include/asm/arch-sunxi/i2c.h b/arch/arm/include/asm/arch-sunxi/i2c.h -index f0da46d863c..98c26d7408e 100644 ---- a/arch/arm/include/asm/arch-sunxi/i2c.h -+++ b/arch/arm/include/asm/arch-sunxi/i2c.h -@@ -11,10 +11,13 @@ - #define CFG_I2C_MVTWSI_BASE0 SUNXI_TWI0_BASE - #endif - #ifdef CONFIG_I2C1_ENABLE - #define CFG_I2C_MVTWSI_BASE1 SUNXI_TWI1_BASE - #endif -+#ifdef CONFIG_I2C3_ENABLE -+#define CONFIG_I2C_MVTWSI_BASE3 SUNXI_TWI3_BASE -+#endif - #ifdef CONFIG_R_I2C_ENABLE - #define CFG_I2C_MVTWSI_BASE2 SUNXI_R_TWI_BASE - #endif - - /* This is abp0-clk on sun4i/5i/7i / abp1-clk on sun6i/sun8i which is 24MHz */ -diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig -index d91faf9ab13..59cd48653c3 100644 ---- a/arch/arm/mach-sunxi/Kconfig -+++ b/arch/arm/mach-sunxi/Kconfig -@@ -807,10 +807,19 @@ config I2C1_ENABLE - bool "Enable I2C/TWI controller 1" - select CMD_I2C - ---help--- - See I2C0_ENABLE help text. - -+if MACH_SUN50I_H616 -+config I2C3_ENABLE -+ bool "Enable I2C/TWI controller 3" -+ default n -+ select CMD_I2C -+ ---help--- -+ See I2C0_ENABLE help text. -+endif -+ - if SUNXI_GEN_SUN6I || SUN50I_GEN_H6 - config R_I2C_ENABLE - bool "Enable the PRCM I2C/TWI controller" - # This is used for the pmic on H3 - default y if SY8106A_POWER -diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c -index 7d2d5d478fc..ca084bddda0 100644 ---- a/arch/arm/mach-sunxi/board.c -+++ b/arch/arm/mach-sunxi/board.c -@@ -479,10 +479,11 @@ void board_init_f(ulong dummy) - - #if CONFIG_IS_ENABLED(I2C) && CONFIG_IS_ENABLED(SYS_I2C_LEGACY) - /* Needed early by sunxi_board_init if PMU is enabled */ - i2c_init_board(); - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); -+ i2c_set_bus_num(0); - #endif - sunxi_board_init(); - } - #endif /* CONFIG_SPL_BUILD */ - -diff --git a/arch/arm/mach-sunxi/clock_sun50i_h6.c b/arch/arm/mach-sunxi/clock_sun50i_h6.c -index 7f60b8c79fc..8c97ddb66c4 100644 ---- a/arch/arm/mach-sunxi/clock_sun50i_h6.c -+++ b/arch/arm/mach-sunxi/clock_sun50i_h6.c -@@ -51,10 +51,14 @@ void clock_init_safe(void) - /* - * The mux and factor are set, but the clock will be enabled in - * DRAM initialization code. - */ - writel(MBUS_CLK_SRC_PLL6X2 | MBUS_CLK_M(3), &ccm->mbus_cfg); -+ -+ writel(0x10001, 0x030017ac); -+ writel(0x50, 0x0300a028); -+ writel(0x20, 0x0300a040); - } - #endif - - void clock_init_uart(void) - { -diff --git a/board/sunxi/board.c b/board/sunxi/board.c -index 2163fac5e06..302a927f524 100644 ---- a/board/sunxi/board.c -+++ b/board/sunxi/board.c -@@ -13,10 +13,11 @@ - #include - #include - #include - #include - #include -+#include - #include - #include - #include - #include - #include -@@ -107,10 +108,21 @@ void i2c_init_board(void) - sunxi_gpio_set_cfgpin(SUNXI_GPH(3), SUN50I_GPH_TWI1); - clock_twi_onoff(1, 1); - #endif - #endif - -+#ifdef CONFIG_I2C3_ENABLE -+#if defined(CONFIG_MACH_SUN50I_H616) -+ sunxi_gpio_set_cfgpin(SUNXI_GPA(10), 2); -+ sunxi_gpio_set_cfgpin(SUNXI_GPA(11), 2); -+ sunxi_gpio_set_cfgpin(SUNXI_GPA(12), 2); -+ sunxi_gpio_set_pull(SUNXI_GPA(10), SUNXI_GPIO_PULL_UP); -+ sunxi_gpio_set_pull(SUNXI_GPA(11), SUNXI_GPIO_PULL_UP); -+ clock_twi_onoff(3, 1); -+#endif -+#endif -+ - #ifdef CONFIG_R_I2C_ENABLE - #ifdef CONFIG_MACH_SUN50I - clock_twi_onoff(5, 1); - sunxi_gpio_set_cfgpin(SUNXI_GPL(8), SUN50I_GPL_R_TWI); - sunxi_gpio_set_cfgpin(SUNXI_GPL(9), SUN50I_GPL_R_TWI); -@@ -568,10 +580,11 @@ static void sunxi_spl_store_dram_size(phys_addr_t dram_size) - } - - void sunxi_board_init(void) - { - int power_failed = 0; -+ u8 data[2]; - - #ifdef CONFIG_LED_STATUS - if (IS_ENABLED(CONFIG_SPL_DRIVERS_MISC)) - status_led_init(); - #endif -@@ -658,10 +671,27 @@ void sunxi_board_init(void) - */ - if (!power_failed) - clock_set_pll1(get_board_sys_clk()); - else - printf("Failed to set core voltage! Can't set CPU frequency\n"); -+ -+ i2c_set_bus_num(1); -+ data[0] = 0; -+ data[1] = 1; -+ i2c_write(0x10, 0xfe, 1, data, 2); -+ i2c_write(0x10, 2, 1, data, 2); -+ data[1] = 1; -+ i2c_write(0x10, 2, 1, data, 2); -+ data[1] = 0xf; -+ i2c_write(0x10, 0x16, 1, data, 2); -+ data[1] = 3; -+ i2c_write(0x10, 0x14, 1, data, 2); -+ data[1] = 0x60; -+ i2c_write(0x10, 0xfe, 1, data, 2); -+ data[0] = 0x08; -+ data[1] = 0x14; -+ i2c_write(0x10, 0, 1, data, 2); - } - #endif /* CONFIG_SPL_BUILD */ - - #ifdef CONFIG_USB_GADGET - int g_dnl_board_usb_cable_connected(void) -diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c -index a12f7e32e8f..98804029719 100644 ---- a/drivers/net/sun8i_emac.c -+++ b/drivers/net/sun8i_emac.c -@@ -904,10 +904,15 @@ static const struct emac_variant emac_variant_a64 = { - static const struct emac_variant emac_variant_h6 = { - .syscon_offset = 0x30, - .support_rmii = true, - }; - -+static const struct emac_variant emac_variant_h616_1 = { -+ .syscon_offset = 0x34, -+ .support_rmii = true, -+}; -+ - static const struct udevice_id sun8i_emac_eth_ids[] = { - { .compatible = "allwinner,sun8i-a83t-emac", - .data = (ulong)&emac_variant_a83t }, - { .compatible = "allwinner,sun8i-h3-emac", - .data = (ulong)&emac_variant_h3 }, -@@ -915,10 +920,12 @@ static const struct udevice_id sun8i_emac_eth_ids[] = { - .data = (ulong)&emac_variant_r40 }, - { .compatible = "allwinner,sun50i-a64-emac", - .data = (ulong)&emac_variant_a64 }, - { .compatible = "allwinner,sun50i-h6-emac", - .data = (ulong)&emac_variant_h6 }, -+ { .compatible = "allwinner,sun50i-h616-emac1", -+ .data = (ulong)&emac_variant_h616_1 }, - { } - }; - - U_BOOT_DRIVER(eth_sun8i_emac) = { - .name = "eth_sun8i_emac", -diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c -index 37ea93715d1..a9c3bf05702 100644 ---- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c -+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c -@@ -735,10 +735,11 @@ static const struct sunxi_pinctrl_desc __maybe_unused sun50i_h6_r_pinctrl_desc = - .num_banks = 2, - }; - - static const struct sunxi_pinctrl_function sun50i_h616_pinctrl_functions[] = { - { "emac0", 2 }, /* PI0-PI16 */ -+ { "emac1", 2 }, /* PA0-PA9 */ - { "gpio_in", 0 }, - { "gpio_out", 1 }, - { "mmc0", 2 }, /* PF0-PF5 */ - { "mmc1", 2 }, /* PG0-PG5 */ - { "mmc2", 3 }, /* PC0-PC16 */ --- -Created with Armbian build tools https://github.com/armbian/build -