Rearrange BTT CB1 patches
This commit is contained in:
parent
4ef3450dc5
commit
00c3dd58da
@ -1,67 +1,20 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: JohnTheCoolingFan <ivan8215145640@gmail.com>
|
||||
Date: Fri, 9 Aug 2024 06:13:19 +0000
|
||||
Subject: Add built-in H616 PHY support for bigtreetech cb1
|
||||
Date: Fri, 9 Aug 2024 07:14:37 +0000
|
||||
Subject: Enable H616 Internal PHY (emac1)
|
||||
|
||||
Signed-off-by: JohnTheCoolingFan <ivan8215145640@gmail.com>
|
||||
---
|
||||
arch/arm/dts/sun50i-h616-bigtreetech-cb1.dts | 19 ++++++
|
||||
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 ++++++++++
|
||||
configs/bigtreetech_cb1_defconfig | 5 +-
|
||||
drivers/net/sun8i_emac.c | 7 +++
|
||||
drivers/pinctrl/sunxi/pinctrl-sunxi.c | 1 +
|
||||
10 files changed, 104 insertions(+), 2 deletions(-)
|
||||
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-bigtreetech-cb1.dts b/arch/arm/dts/sun50i-h616-bigtreetech-cb1.dts
|
||||
index dc0e04be947..acef7ef4f03 100644
|
||||
--- a/arch/arm/dts/sun50i-h616-bigtreetech-cb1.dts
|
||||
+++ b/arch/arm/dts/sun50i-h616-bigtreetech-cb1.dts
|
||||
@@ -14,10 +14,11 @@
|
||||
/ {
|
||||
model = "BigTreeTech CB1";
|
||||
compatible = "bigtreetech,cb1", "allwinner,sun50i-h616";
|
||||
|
||||
aliases {
|
||||
+ ethernet0 = &emac1;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
@@ -92,10 +93,28 @@
|
||||
reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */
|
||||
post-power-on-delay-ms = <200>;
|
||||
};
|
||||
};
|
||||
|
||||
+&emac1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rmii_pins>;
|
||||
+ phy-mode = "rmii";
|
||||
+ phy-handle = <&rmii_phy>;
|
||||
+ phy-supply = <®_aldo1>;
|
||||
+ allwinner,rx-delay-ps = <3100>;
|
||||
+ allwinner,tx-delay-ps = <700>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mdio1 {
|
||||
+ rmii_phy: ethernet-phy@1 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci1 {
|
||||
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
|
||||
@ -270,28 +223,6 @@ index 2163fac5e06..302a927f524 100644
|
||||
|
||||
#ifdef CONFIG_USB_GADGET
|
||||
int g_dnl_board_usb_cable_connected(void)
|
||||
diff --git a/configs/bigtreetech_cb1_defconfig b/configs/bigtreetech_cb1_defconfig
|
||||
index d7b638e38a3..3dbd152c7c1 100644
|
||||
--- a/configs/bigtreetech_cb1_defconfig
|
||||
+++ b/configs/bigtreetech_cb1_defconfig
|
||||
@@ -15,14 +15,15 @@ CONFIG_SPL_MAX_SIZE=0xbfa0
|
||||
CONFIG_SPL_STACK=0x58000
|
||||
CONFIG_SPL_I2C=y
|
||||
CONFIG_SPL_SYS_I2C_LEGACY=y
|
||||
CONFIG_SYS_I2C_MVTWSI=y
|
||||
CONFIG_SYS_I2C_SLAVE=0x7f
|
||||
-CONFIG_SYS_I2C_SPEED=400000
|
||||
+CONFIG_SYS_I2C_SPEED=100000
|
||||
CONFIG_SPI_FLASH_MACRONIX=y
|
||||
-CONFIG_NET=n
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
CONFIG_SYS_PROMPT="CB1@uboot:~$ "
|
||||
CONFIG_AXP313_POWER=y
|
||||
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
CONFIG_MMC_BROKEN_CD=y
|
||||
+CONFIG_SUN8I_EMAC=y
|
||||
+CONFIG_I2C3_ENABLE=y
|
||||
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
|
||||
index a12f7e32e8f..98804029719 100644
|
||||
--- a/drivers/net/sun8i_emac.c
|
||||
@ -1,22 +1,20 @@
|
||||
From ca605c51044593c72587e589ac2be90e1aa34795 Mon Sep 17 00:00:00 2001
|
||||
From: Alan <Alan>
|
||||
Date: Fri, 19 May 2023 17:01:37 +0800
|
||||
Subject: [PATCH 06/11] Add: add BigTreeTech CB1 dts & deconfig files
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: JohnTheCoolingFan <ivan8215145640@gmail.com>
|
||||
Date: Fri, 9 Aug 2024 07:23:02 +0000
|
||||
Subject: Add BigTreeTech CB1 device tree and defconfig
|
||||
|
||||
Signed-off-by: JohnTheCoolingFan <ivan8215145640@gmail.com>
|
||||
---
|
||||
arch/arm/dts/sun50i-h616-bigtreetech-cb1.dts | 219 +++++++++++++++++++
|
||||
arch/arm/dts/sun50i-h616.dtsi | 6 +-
|
||||
configs/bigtreetech_cb1_defconfig | 28 +++
|
||||
3 files changed, 250 insertions(+), 3 deletions(-)
|
||||
create mode 100644 arch/arm/dts/sun50i-h616-bigtreetech-cb1.dts
|
||||
create mode 100644 configs/bigtreetech_cb1_defconfig
|
||||
arch/arm/dts/sun50i-h616-bigtreetech-cb1.dts | 238 ++++++++++
|
||||
configs/bigtreetech_cb1_defconfig | 29 ++
|
||||
2 files changed, 267 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/dts/sun50i-h616-bigtreetech-cb1.dts b/arch/arm/dts/sun50i-h616-bigtreetech-cb1.dts
|
||||
new file mode 100644
|
||||
index 0000000000..dc0e04be94
|
||||
index 00000000000..acef7ef4f03
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/sun50i-h616-bigtreetech-cb1.dts
|
||||
@@ -0,0 +1,219 @@
|
||||
@@ -0,0 +1,238 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
||||
+/*
|
||||
+ * Copyright (C) 2022 Arm Ltd.
|
||||
@ -35,6 +33,7 @@ index 0000000000..dc0e04be94
|
||||
+ compatible = "bigtreetech,cb1", "allwinner,sun50i-h616";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet0 = &emac1;
|
||||
+ serial0 = &uart0;
|
||||
+ };
|
||||
+
|
||||
@ -113,6 +112,24 @@ index 0000000000..dc0e04be94
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&emac1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rmii_pins>;
|
||||
+ phy-mode = "rmii";
|
||||
+ phy-handle = <&rmii_phy>;
|
||||
+ phy-supply = <®_aldo1>;
|
||||
+ allwinner,rx-delay-ps = <3100>;
|
||||
+ allwinner,tx-delay-ps = <700>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mdio1 {
|
||||
+ rmii_phy: ethernet-phy@1 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ehci1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@ -236,43 +253,12 @@ index 0000000000..dc0e04be94
|
||||
+ usb1_vbus-supply = <®_usb1_vbus>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
diff --git a/arch/arm/dts/sun50i-h616.dtsi b/arch/arm/dts/sun50i-h616.dtsi
|
||||
index 74aed0d232..46651703e9 100644
|
||||
--- a/arch/arm/dts/sun50i-h616.dtsi
|
||||
+++ b/arch/arm/dts/sun50i-h616.dtsi
|
||||
@@ -187,7 +187,7 @@
|
||||
pins = "PF0", "PF1", "PF2", "PF3",
|
||||
"PF4", "PF5";
|
||||
function = "mmc0";
|
||||
- drive-strength = <30>;
|
||||
+ drive-strength = <40>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
pins = "PG0", "PG1", "PG2", "PG3",
|
||||
"PG4", "PG5";
|
||||
function = "mmc1";
|
||||
- drive-strength = <30>;
|
||||
+ drive-strength = <40>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
"PC8", "PC9", "PC10", "PC11",
|
||||
"PC13", "PC14", "PC15", "PC16";
|
||||
function = "mmc2";
|
||||
- drive-strength = <30>;
|
||||
+ drive-strength = <40>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
diff --git a/configs/bigtreetech_cb1_defconfig b/configs/bigtreetech_cb1_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..96c5c17cff
|
||||
index 00000000000..3dbd152c7c1
|
||||
--- /dev/null
|
||||
+++ b/configs/bigtreetech_cb1_defconfig
|
||||
@@ -0,0 +1,28 @@
|
||||
@@ -0,0 +1,29 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_SUNXI=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h616-bigtreetech-cb1"
|
||||
@ -292,15 +278,16 @@ index 0000000000..96c5c17cff
|
||||
+CONFIG_SPL_SYS_I2C_LEGACY=y
|
||||
+CONFIG_SYS_I2C_MVTWSI=y
|
||||
+CONFIG_SYS_I2C_SLAVE=0x7f
|
||||
+CONFIG_SYS_I2C_SPEED=400000
|
||||
+CONFIG_SYS_I2C_SPEED=100000
|
||||
+CONFIG_SPI_FLASH_MACRONIX=y
|
||||
+CONFIG_NET=n
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_SYS_PROMPT="CB1@uboot:~$ "
|
||||
+CONFIG_AXP313_POWER=y
|
||||
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
+CONFIG_MMC_BROKEN_CD=y
|
||||
+CONFIG_SUN8I_EMAC=y
|
||||
+CONFIG_I2C3_ENABLE=y
|
||||
--
|
||||
2.34.1
|
||||
Created with Armbian build tools https://github.com/armbian/build
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user