kernel/0058-feat-add-hifive-premier-550-dts.patch
2024-12-19 16:34:44 -05:00

340 lines
9.4 KiB
Diff

From 0500231aaddc726b12944295dadab38d2179185c Mon Sep 17 00:00:00 2001
From: ningyu <ningyu@eswincomputing.com>
Date: Fri, 21 Jun 2024 09:53:26 +0800
Subject: [PATCH 058/219] feat:add hifive premier 550 dts
Changelogs:
1.Notes:The hifive-premier-550.dts in linux-6.6 is actually for
DVB-2.
---
.../boot/dts/eswin/hifive-premier-550.dts | 226 +++++++-----------
1 file changed, 91 insertions(+), 135 deletions(-)
diff --git a/arch/riscv/boot/dts/eswin/hifive-premier-550.dts b/arch/riscv/boot/dts/eswin/hifive-premier-550.dts
index 7644991dc251..bde120c77fe1 100644
--- a/arch/riscv/boot/dts/eswin/hifive-premier-550.dts
+++ b/arch/riscv/boot/dts/eswin/hifive-premier-550.dts
@@ -56,11 +56,18 @@ cpus {
timebase-frequency = <RTCCLK_FREQ>;
};
+ memory@59000000 {
+ device_type = "memory";
+ reg = <0x0 0x59000000 0x0 0x400000>;
+ numa-node-id = <0>;
+ };
+
memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 MEMORY_SIZE_H MEMORY_SIZE_L>;
numa-node-id = <0>;
};
+
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
@@ -75,10 +82,32 @@ linux,cma {
linux,cma-default;
};
+ npu0_reserved: sprammemory@59000000 {
+ no-map;
+ reg = <0x0 0x59000000 0x0 0x400000>;
+ };
+
lpcpu0_reserved: lpcpu@a0000000 {
no-map;
reg = <0x0 0xa0000000 0x0 0x100000>;
};
+
+ g2d_4GB_boundary_reserved_4k {
+ no-map;
+ reg = <0x0 0xfffff000 0x0 0x1000>;
+ };
+
+ mmz_nid_0_part_0 {
+ compatible = "eswin-reserve-memory";
+ reg = <0x1 0x40000000 0x2 0x80000000>;
+ no-map;
+ };
+
+ mmz_nid_0_part_1 {
+ compatible = "eswin-reserve-memory";
+ reg = <0x3 0xf0000000 0x0 0x10000000>;
+ no-map;
+ };
};
soc {
@@ -90,9 +119,6 @@ reset_test@1e00e000 {
reset-names = "bus", "core", "dbg";
};
};
- npu0_reserved: sprammemory@59000000 {
- reg = <0x0 0x59000000 0x0 0x400000>;
- };
};
&d0_clock {
@@ -423,7 +449,7 @@ &d0_gmac1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio111_default>;
- rst-gpios = <&portd 11 GPIO_ACTIVE_LOW>;
+ rst-gpios = <&portd 15 GPIO_ACTIVE_LOW>;
eswin,rgmiisel = <&pinctrl 0x294 0x3>;
eswin,led-cfgs = <0x6100 0xa40 0x420>;
};
@@ -441,17 +467,7 @@ &d0_usbdrd3_0 {
&d0_usbdrd_dwc3_0 {
status = "okay";
dr_mode = "host";
- /* usb-role-switch;
- role-switch-default-mode = "host"; */
maximum-speed = "super-speed";
- port {
- #address-cells = <1>;
- #size-cells = <0>;
- dwc3_0_role_switch: endpoint@0 {
- reg = <0>;
- remote-endpoint = <&usbc0_role_sw>;
- };
- };
};
&d0_usbdrd3_1 {
@@ -462,6 +478,14 @@ &d0_usbdrd_dwc3_1 {
status = "okay";
dr_mode = "host";
maximum-speed = "super-speed";
+ usb-hub {
+ gpio-hog;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio43_default>;
+ gpios = <&portb 11 GPIO_ACTIVE_HIGH>;
+ output-low;
+ line-name = "usb-hub-reset";
+ };
};
&d0_dmac0 {
@@ -603,16 +627,6 @@ fusb303b@21 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio5_default>;
int-gpios = <&porta 5 GPIO_ACTIVE_HIGH>;
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@0 {
- reg = <0>;
- usbc0_role_sw: endpoint@0 {
- remote-endpoint = <&dwc3_0_role_switch>;
- };
- };
- };
connector {
compatible = "usb-c-connector";
label = "USB-C";
@@ -675,86 +689,9 @@ pac1934:pmic@10 {
label = "som_info";
/*The update number of times the energy accumulates*/
energy_acc_count = <0>;
- shunt_resistors=<4 4 4 4>;
+ shunt_resistors=<1 1 1 1>;
reg = <0x10>;
};
- sic451:pmic@11 {
- compatible = "Vishay,sic451";
- reg = <0x11>;
- label = "npu_vdd";
- regulators{
- vdd_npu1:vdd_npu{
- regulator-name="VDD_NPU";
- regulator-min-microvolt=<100000>;
- regulator-max-microvolt=<1600000>;
- /* regulator-max-step-microvolt = <100000>; */
- regulator-boot-on;
- regulator-always-on;
- };
- };
- };
- pca9450: pmic@25 {
- compatible = "nxp,pca9450c";
- interrupts = <134 IRQ_TYPE_LEVEL_HIGH>;
- reg = <0x25>;
- regulators {
- BUCK1 {
- regulator-name = "BUCK1";
- regulator-min-microvolt = <800000>;
- regulator-max-microvolt = <800000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- BUCK2 {
- regulator-name = "BUCK2";
- regulator-min-microvolt = <800000>;
- regulator-max-microvolt = <800000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- BUCK4 {
- regulator-name = "BUCK4";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- BUCK5 {
- regulator-name = "BUCK5";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- BUCK6 {
- regulator-name = "BUCK6";
- regulator-min-microvolt = <1075000>;
- regulator-max-microvolt = <1075000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- LDO3 {
- regulator-name = "LDO3";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-boot-on;
- regulator-always-on;
- };
-
- LDO5 {
- regulator-name = "LDO5";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-boot-on;
- regulator-always-on;
- };
- };
- };
sys_power:ina226@44 {
compatible = "ti,ina226";
@@ -763,6 +700,25 @@ sys_power:ina226@44 {
reg = <0x44>;
shunt-resistor = <1000>;
};
+
+ mpq8785@12 {
+ compatible = "mps,mpq8785";
+ reg = <0x12>;
+ eswin,regulator_default-microvolt=<1000000>;
+ eswin,regulator_label = "supply vdd1", "npu vdd1", "npu current1", "npu temperature1";
+ label = "npu_vdd";
+ regulators{
+ npu_vcc1:npu_svcc{
+ regulator-name="NPU_SVCC";
+ regulator-min-microvolt=<700000>;
+ regulator-max-microvolt=<1100000>;
+ regulator-min-microamp=<20000000>;
+ regulator-max-microamp=<40000000>;
+ regulator-ov-protection-microvolt=<1100000>;
+ regulator-always-on;
+ };
+ };
+ };
};
&pwm0 {
@@ -816,14 +772,14 @@ &timer3 {
&pinctrl {
status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_gpio21_default &pinctrl_gpio52_default &pinctrl_gpio53_default &pinctrl_gpio42_default
- &pinctrl_gpio17_default &pinctrl_gpio64_default &pinctrl_gpio65_default &pinctrl_gpio66_default
- &pinctrl_gpio67_default &pinctrl_gpio18_default &pinctrl_gpio19_default &pinctrl_gpio20_default
- &pinctrl_gpio7_default &pinctrl_gpio8_default &pinctrl_gpio9_default &pinctrl_gpio10_default
- &pinctrl_gpio35_default &pinctrl_gpio36_default &pinctrl_gpio37_default &pinctrl_gpio38_default &pinctrl_gpio39_default &pinctrl_gpio40_default
- &pinctrl_gpio46_default &pinctrl_gpio47_default
- &pinctrl_gpio92_default &pinctrl_gpio93_default>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio6_default &pinctrl_gpio7_default &pinctrl_gpio8_default &pinctrl_gpio9_default
+ &pinctrl_gpio10_default &pinctrl_gpio17_default &pinctrl_gpio35_default &pinctrl_gpio36_default
+ &pinctrl_gpio37_default &pinctrl_gpio38_default &pinctrl_gpio39_default &pinctrl_gpio40_default
+ &pinctrl_gpio41_default &pinctrl_gpio46_default &pinctrl_gpio52_default
+ &pinctrl_gpio53_default &pinctrl_gpio64_default &pinctrl_gpio65_default &pinctrl_gpio66_default
+ &pinctrl_gpio67_default &pinctrl_gpio70_default &pinctrl_gpio73_default &pinctrl_gpio83_default
+ &pinctrl_gpio86_default &pinctrl_gpio87_default &pinctrl_gpio92_default &pinctrl_gpio93_default>;
/* pin header default function for GPIO
SPI1 (CS0,SCLK,MOSI,MISO,D2,D3): GPIO 35,36,37,38,39,40
@@ -832,36 +788,36 @@ UART3(TX,RX): GPIO 92,93
*/
};
-/* GPIO USED
- gpio0 : FP Audio Jack Sense(I)
- gpio5 : TYPE C cc logic interrupt(I)
- gpio6 : TYPE C cc logic ID(I)
- gpio11 : RP Audio Jack Sense(I)
- gpio12 : PCIE present(I)
- gpio13 : TF card insert detect(I)
- gpio14 : Display touch ctrl interrupt(I)
- gpio15 : Wlan wake host(I)
- gpio16 : VDD NPU Alert(I)
- gpio27 : SATA active led ctrl(O)
- gpio28 : RP audio jack sense(I)
+/*
+GPIO USED ON CarrierBoard:
+ gpio0 : FP Audio Jack Sense(I), active low
+ gpio5 : TYPE C cc logic interrupt(I), active low
+ gpio11 : BT WAKE HOST(I), active low
+ gpio12 : PCIE present(I), active low
+ gpio14 : DSI FPC CON CTRL(J10&J11)
+ gpio15 : Wlan wake host(I), active low
+ gpio28 : RP audio jack sense(I), active low
gpio29 : EMMC active led ctrl(O)
- gpio41 : PWM ctrl led(O)
- gpio43 : USB3.2 Gen1 hub Resetn(O)
- gpio70 : Map on pin header(J46)
+
+ gpio43 : USB3.2 Gen1 hub Resetn(O), active low
gpio71 : CSI fpc con ctrl(O)
- gpio73 : Map on pin header(J46)
gpio74 : CSI fpc con ctrl(O)
- gpio76 : Map on pin header(J46)
gpio77 : CSI fpc con ctrl(O)
- gpio79 : Map on pin header(J46)
+ gpio76 : HOST WAKE BT(O), active low
+ gpio79 : WLAN POWER ON(O), active high
gpio80 : CSI fpc con ctrl(O)
- gpio82 : LED back light power ctrl(O)
- gpio83 : CSI fpc con ctrl(O)
- gpio85 : DSI Resetn(O)
- gpio86 : CSI fpc con ctrl(O)
- gpio94 : Host wake wlan(I)
- gpio106 : gphy0 resern(O)
- gpio111 : gphy1 resern(O)
+ gpio82 : DSI FPC CON CTRL(J10)
+ gpio85 : DSI FPC CON CTRL(J11)
+ gpio84 : GPIO LED CTRL(O), active high
+
+ GPIO USED ON SOM:
+ gpio18 : HOST WAKE WLAN(O), active low
+ gpio19 : HOST WAKE BT(O), active low
+ gpio20 : WLAN WAKE HOST(I), active low
+ gpio21 : BT WAKE HOST(I), active low
+ gpio106 : gphy0 resern(O), active low
+ gpio111 : gphy1 resern(O), active low
+
*/
&gpio0 {
--
2.47.0