mirror of
https://github.com/Fishwaldo/build.git
synced 2025-06-05 13:51:45 +00:00
add H6 I2Cs and UARTs
This commit is contained in:
parent
f04ca8bd58
commit
7c85b3b53e
2 changed files with 135 additions and 0 deletions
75
patch/kernel/sunxi-dev/general-add-H6-I2Cs.patch
Normal file
75
patch/kernel/sunxi-dev/general-add-H6-I2Cs.patch
Normal file
|
@ -0,0 +1,75 @@
|
|||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||
index bec8c4a..25d3be2 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||
@@ -245,6 +258,24 @@
|
||||
drive-strength = <40>;
|
||||
};
|
||||
|
||||
+ i2c0_pins: i2c0 {
|
||||
+ pins = "PD25", "PD26";
|
||||
+ function = "i2c0";
|
||||
+ pull = <1>;
|
||||
+ };
|
||||
+
|
||||
+ i2c1_pins: i2c1 {
|
||||
+ pins = "PH5", "PH6";
|
||||
+ function = "i2c1";
|
||||
+ pull = <1>;
|
||||
+ };
|
||||
+
|
||||
+ i2c2_pins: i2c2 {
|
||||
+ pins = "PD23", "PD24";
|
||||
+ function = "i2c2";
|
||||
+ pull = <1>;
|
||||
+ };
|
||||
+
|
||||
mmc0_pins: mmc0-pins {
|
||||
pins = "PF0", "PF1", "PF2", "PF3",
|
||||
"PF4", "PF5";
|
||||
@@ -268,6 +294,45 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ i2c0: i2c@5002000 {
|
||||
+ compatible = "allwinner,sun6i-a31-i2c";
|
||||
+ reg = <0x05002000 0x400>;
|
||||
+ interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&ccu CLK_BUS_I2C0>;
|
||||
+ resets = <&ccu RST_BUS_I2C0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c0_pins>;
|
||||
+ status = "okay";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ i2c1: i2c@5002400 {
|
||||
+ compatible = "allwinner,sun6i-a31-i2c";
|
||||
+ reg = <0x05002400 0x400>;
|
||||
+ interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&ccu CLK_BUS_I2C1>;
|
||||
+ resets = <&ccu RST_BUS_I2C1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c1_pins>;
|
||||
+ status = "okay";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ i2c2: i2c@5002800 {
|
||||
+ compatible = "allwinner,sun6i-a31-i2c";
|
||||
+ reg = <0x05002800 0x400>;
|
||||
+ interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&ccu CLK_BUS_I2C2>;
|
||||
+ resets = <&ccu RST_BUS_I2C2>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c2_pins>;
|
||||
+ status = "okay";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
mmc0: mmc@4020000 {
|
||||
compatible = "allwinner,sun50i-h6-mmc",
|
||||
"allwinner,sun50i-a64-mmc";
|
60
patch/kernel/sunxi-dev/general-add-H6-UARTs.patch
Normal file
60
patch/kernel/sunxi-dev/general-add-H6-UARTs.patch
Normal file
|
@ -0,0 +1,60 @@
|
|||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||
index c72da8c..41a057e 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
|
||||
@@ -128,6 +128,21 @@
|
||||
pins = "PH0", "PH1";
|
||||
function = "uart0";
|
||||
};
|
||||
+
|
||||
+ uart1_pins: uart1 {
|
||||
+ pins = "PG6", "PG7", "PG8", "PG9";
|
||||
+ function = "uart1";
|
||||
+ };
|
||||
+
|
||||
+ uart2_pins: uart2 {
|
||||
+ pins = "PD19", "PD20";
|
||||
+ function = "uart2";
|
||||
+ };
|
||||
+
|
||||
+ uart3_pins: uart3 {
|
||||
+ pins = "PD23", "PD24", "PD25", "PD26";
|
||||
+ function = "uart3";
|
||||
+ };
|
||||
};
|
||||
|
||||
uart0: serial@5000000 {
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts
|
||||
index 4d8ca45..f05c995 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts
|
||||
@@ -242,6 +242,12 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&uart3 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart3_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb2otg {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
|
||||
index 4d8ca45..f05c995 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
|
||||
@@ -242,6 +242,12 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&uart3 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart3_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&usb2otg {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
Loading…
Add table
Reference in a new issue