From 071106ecf68c401173c58808b1cf5f68cc50d390 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 05 Jan 2024 08:39:27 +0000
Subject: [PATCH] change wifi driver to cypress
---
kernel/arch/arm64/boot/dts/rockchip/rk3399pro-evb-v10-linux.dts | 100 ++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 84 insertions(+), 16 deletions(-)
diff --git a/kernel/arch/arm64/boot/dts/rockchip/rk3399pro-evb-v10-linux.dts b/kernel/arch/arm64/boot/dts/rockchip/rk3399pro-evb-v10-linux.dts
index 08ac2a4..dbcc441 100644
--- a/kernel/arch/arm64/boot/dts/rockchip/rk3399pro-evb-v10-linux.dts
+++ b/kernel/arch/arm64/boot/dts/rockchip/rk3399pro-evb-v10-linux.dts
@@ -8,6 +8,7 @@
#include <dt-bindings/display/drm_mipi_dsi.h>
#include <dt-bindings/sensor-dev.h>
#include <dt-bindings/pwm/pwm.h>
+#include "dt-bindings/usb/pd.h"
#include "rk3399pro.dtsi"
#include "rk3399-linux.dtsi"
#include "rk3399-opp.dtsi"
@@ -135,6 +136,8 @@
prepare-delay-ms = <20>;
enable-delay-ms = <20>;
reset-delay-ms = <20>;
+ width-mm = <120>;
+ height-mm = <160>;
display-timings {
native-mode = <&timing0>;
@@ -196,6 +199,16 @@
reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
};
+ vbus_typec: vbus-typec-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_typec0_en>;
+ regulator-name = "vbus_typec";
+ vin-supply = <&vcc5v0_sys>;
+ };
+
vcc_phy: vcc-phy-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc_phy";
@@ -238,7 +251,6 @@
&cdn_dp {
status = "okay";
- extcon = <&fusb0>;
phys = <&tcphy0_dp>;
};
@@ -647,7 +659,6 @@
bq25700: bq25700@6b {
compatible = "ti,bq25703";
reg = <0x6b>;
- extcon = <&fusb0>;
interrupt-parent = <&gpio1>;
interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
@@ -774,13 +785,52 @@
i2c-scl-falling-time-ns = <11>;
clock-frequency = <100000>;
- fusb0: fusb30x@22 {
- compatible = "fairchild,fusb302";
+ usbc0: fusb302@22 {
+ compatible = "fcs,fusb302";
reg = <0x22>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
- pinctrl-0 = <&fusb0_int>;
- int-n-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&usbc0_int>;
+ vbus-supply = <&vbus_typec>;
status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ usbc0_role_sw: endpoint@0 {
+ remote-endpoint = <&dwc3_0_role_switch>;
+ };
+ };
+ };
+
+ usb_con: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C";
+ data-role = "dual";
+ power-role = "dual";
+ try-power-role = "sink";
+ op-sink-microwatt = <1000000>;
+ sink-pdos =
+ <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
+ source-pdos =
+ <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ usbc0_orien_sw: endpoint {
+ remote-endpoint = <&tcphy0_orientation_switch>;
+ };
+ };
+ };
+ };
};
};
@@ -982,8 +1032,16 @@
};
&tcphy0 {
- extcon = <&fusb0>;
status = "okay";
+ orientation-switch;
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ tcphy0_orientation_switch: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&usbc0_orien_sw>;
+ };
+ };
};
&tcphy1 {
@@ -998,7 +1056,6 @@
&u2phy0 {
status = "okay";
- extcon = <&fusb0>;
u2phy0_otg: otg-port {
status = "okay";
@@ -1054,7 +1111,15 @@
&usbdrd_dwc3_0 {
status = "okay";
- extcon = <&fusb0>;
+ usb-role-switch;
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ dwc3_0_role_switch: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&usbc0_role_sw>;
+ };
+ };
};
&usbdrd_dwc3_1 {
@@ -1085,13 +1150,6 @@
charger_ok_int: charger-ok-int {
rockchip,pins =
<1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
- };
- };
-
- fusb30x {
- fusb0_int: fusb0-int {
- rockchip,pins =
- <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
@@ -1146,6 +1204,16 @@
};
};
+ usb-typec {
+ usbc0_int: usbc0-int {
+ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ vcc5v0_typec0_en: vcc5v0-typec0-en {
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
sdio-pwrseq {
wifi_enable_h: wifi-enable-h {
rockchip,pins =
--
Gitblit v1.6.2