Skip to content

Commit

Permalink
arch: arm64 board: youyeetoo r1 v3 usb fixes (#227)
Browse files Browse the repository at this point in the history
* WIP: arch: arm64 board: youyeetoo r1 v3 add rewrited dts code.

* arch: arm64 board: youyeetoo r1 v3 add missing regulator for dcin 12v
- formatting code
- added references to usb ports

arch: arm64 board: youyeetoo r1 v3 added wireless reference and bluetooth
- added the reference to RTC code

arch: arm64 board: youyeetoo r1 still trying to fix usb ports

arch: arm64 board: youyeetoo r1 fix syntax error

arch: arm64 board: youyeetoo r1 add phy-supply on ports

arch: arm64 board: youyeetoo r1 add host mode usb3.0

arch: arm64 board: youyeetoo r1 re-add reference to usb-c/a

arch: arm64 board: youyeetoo r1 fix compilation error.

arch: arm64 board: youyeetoo r1 missing usb3 interface.

arch: arm64 board: youyeetoo r1 wrong vbus supply reference

arch: arm64 board: youyeetoo r1 reformatting code

arch: arm64 board: youyeetoo r1 removed usbc reference and add some reference to usb-a 3.0, vendor dts are uncomplete and usb-a 3.0 not working.

arch: arm64 board: youyeetoo r1 renabled some reference of usb3.0 driver..

arch: arm64 board: youyeetoo r1 testing usb 3.0

arch: arm64 board: youyeetoo r1 missing ;

arch: arm64 board: youyeetoo r1 reformatting code

arch: arm64 board: youyeetoo r1 add hdmi in
  • Loading branch information
SuperKali authored and amazingfate committed Nov 24, 2024
1 parent e9f81c0 commit d8e958e
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 69 deletions.
32 changes: 18 additions & 14 deletions arch/arm64/boot/dts/rockchip/rk3588s-youyeetoo-r1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,24 @@
default-brightness-level = <200>;
};

/* BLUETOOTH */
wireless_bluetooth: wireless-bluetooth {
compatible = "bluetooth-platdata";
clocks = <&hym8563>;
clock-names = "ext_clock";
status = "okay";
};

/* WIFI */
wireless_wlan: wireless-wlan {
compatible = "wlan-platdata";
wifi_chip_type = "rtl8852be";
pinctrl-names = "default";
pinctrl-0 = <&wifi_host_wake_irq>;
WIFI,host_wake_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
status = "okay";
};

/* FAN */
fan: gpio-fan {
compatible = "gpio-fan";
Expand All @@ -153,20 +171,6 @@
>;
status = "okay";
};

usb30_power_ver1 {
compatible = "lylx,xgpio";
gpio = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
def_val = <1>;
status = "okay";
};

usb30_power {
compatible = "lylx,xgpio";
gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
def_val = <1>;
status = "okay";
};
};

/* AUDIO */
Expand Down
130 changes: 75 additions & 55 deletions arch/arm64/boot/dts/rockchip/rk3588s-yyt-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,28 @@

/* POWER REGULATOR 12V DC-IN */

vcc5v0_sys: vcc5v0-sys {
vcc12v_dcin: vcc12v-dcin {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
regulator-name = "vcc12v_dcin";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
};

/* POWER REGULATOR 5V (USB) */
/* POWER REGULATOR 5V SYS */

vcc5v0_usb: vcc5v0-usb {
vcc5v0_sys: vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_usb";
regulator-name = "vcc5v0_sys";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_sys>;
vin-supply = <&vcc12v_dcin>;
};

/* POWER REGULATOR CPU? */
/* POWER REGULATOR CPU */

vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 {
compatible = "regulator-fixed";
Expand Down Expand Up @@ -109,9 +109,19 @@
vin-supply = <&vcc_3v3_s3>;
};

/* POWER REGULATOR 5V (USB2 & USB3)*/
/* POWER REGULATOR 5V (USB2 & USB3) */

vcc5v0_usb: vcc5v0-usb {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_usb";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_sys>;
};

vcc5v0_host_20: vcc5v0-host-20 {
vcc5v0_host_20: vcc5v0-host-20 { // U13 (USB 2.0)
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
Expand All @@ -123,7 +133,7 @@
vin-supply = <&vcc5v0_usb>;
};

vcc5v0_host_30: vcc5v0-host-30 {
vcc5v0_host_30: vcc5v0-host-30 { // U12 (USB 3.0)
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
Expand Down Expand Up @@ -242,18 +252,19 @@
};

&i2c6 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c6m3_xfer>;

hym8563: hym8563@51 {
compatible = "haoyu,hym8563";
reg = <0x51>;
#clock-cells = <0>;
clock-frequency = <32768>;
clock-output-names = "hym8563";
status = "okay";
};
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2c6m3_xfer>;

/* RTC */
hym8563: hym8563@51 {
compatible = "haoyu,hym8563";
reg = <0x51>;
#clock-cells = <0>;
clock-frequency = <32768>;
clock-output-names = "hym8563";
status = "okay";
};
};


Expand Down Expand Up @@ -485,6 +496,10 @@
status = "okay";
};

&hdmi0_in_vp1 {
status = "okay";
};

&i2s5_8ch {
status = "okay";
};
Expand Down Expand Up @@ -591,69 +606,67 @@
status = "okay";
};

/* USB 2.0 */
/* USB 2.0 / USB 3.0 */

&u2phy0 {
status = "okay";
#phy-cells = <0>;
};

&u2phy2 {
status = "okay";
#phy-cells = <0>;
};

&u2phy3 {
status = "okay";
};

&u2phy0_otg {
phy-supply = <&vcc5v0_host_30>;
status = "okay";
};

&u2phy2_host {
phy-supply = <&vcc5v0_host_20>;
status = "okay";
phy-supply = <&vcc5v0_host_20>;
status = "okay";
};

&u2phy3_host {
phy-supply = <&vcc5v0_host_30>;
phy-supply = <&vcc5v0_host_20>;
status = "okay";
};

/* USB 3.0 */

&usbdrd3_0 {
dr_mode = "host";
maximum-speed = "super-speed";
phys = <&u2phy3_host>;
phy-names = "usb3-phy";
status = "okay";
};

&usbdrd_dwc3_0 {
dr_mode = "peripheral";
status = "okay";
dr_mode = "host";
extcon = <&u2phy0>;
};

&usb_host0_ehci {
dr_mode = "host";
status = "okay";
status = "okay";
};

&usb_host0_ohci {
dr_mode = "host";
status = "okay";
status = "okay";
};

&usb_host1_ehci {
dr_mode = "host";
status = "okay";
status = "okay";
};

&usb_host1_ohci {
dr_mode = "host";
status = "okay";
status = "okay";
};

&usbdp_phy0 {
status = "okay";
};

&usbdp_phy0_u3 {
status = "okay";
};

/* PCIe */
Expand Down Expand Up @@ -777,9 +790,9 @@
pinctrl-0 = <&spi0m3_cs0 &spi0m3_cs1 &spi0m3_pins>;
num-cs = <2>;
spi_test@0 {
compatible = "rockchip,spi_test_bus0_cs1";
reg = <0>;
spi-max-frequency = <5000000>;
compatible = "rockchip,spi_test_bus0_cs1";
reg = <0>;
spi-max-frequency = <5000000>;
};
};

Expand Down Expand Up @@ -811,6 +824,7 @@
rockchip,pins = <1 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
/* RTC */
hym8563 {
rtc_int: rtc-int {
rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
Expand All @@ -824,11 +838,11 @@
};
/* USB */
usb {
vcc5v0_host20_en: vcc5v0-host20-en {
rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
vcc5v0_host20_en: vcc5v0-host20-en { // USB 2.0
rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
};
vcc5v0_host30_en: vcc5v0-host30-en {
rockchip,pins = <4 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
vcc5v0_host30_en: vcc5v0-host30-en { // USB 3.0
rockchip,pins = <4 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
/* LCD */
Expand All @@ -847,6 +861,12 @@
<1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
/* WIRELESS */
wireless-wlan {
wifi_host_wake_irq: wifi-host-wake-irq {
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
/* GPIO KEYS */
gpio-key {
key1_pin: key1-pin {
Expand All @@ -860,14 +880,14 @@
xgpio {
gpio_4g:gpio-4g{
rockchip,pins =
<0 23 RK_FUNC_GPIO &pcfg_pull_up>,
<0 23 RK_FUNC_GPIO &pcfg_pull_up>;
//<3 26 RK_FUNC_GPIO &pcfg_pull_up>,
//<3 27 RK_FUNC_GPIO &pcfg_pull_up>,
//<0 21 RK_FUNC_GPIO &pcfg_pull_up>,
//<0 29 RK_FUNC_GPIO &pcfg_pull_up>,
//<4 6 RK_FUNC_GPIO &pcfg_pull_up>,
<4 7 RK_FUNC_GPIO &pcfg_pull_up>,
<0 8 RK_FUNC_GPIO &pcfg_pull_up>;
//<4 7 RK_FUNC_GPIO &pcfg_pull_up>,
//<0 8 RK_FUNC_GPIO &pcfg_pull_up>;
//<4 10 RK_FUNC_GPIO &pcfg_pull_none>,
//<4 13 RK_FUNC_GPIO &pcfg_pull_up>;
};
Expand Down

0 comments on commit d8e958e

Please sign in to comment.