2023-02-22 09:05:12 +00:00
|
|
|
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2023 Collabora Ltd.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "rk3588-u-boot.dtsi"
|
2023-05-29 10:01:35 +00:00
|
|
|
#include <dt-bindings/usb/pd.h>
|
2023-02-22 09:05:12 +00:00
|
|
|
|
|
|
|
/ {
|
|
|
|
chosen {
|
2023-04-18 16:46:41 +00:00
|
|
|
u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci;
|
2023-02-22 09:05:12 +00:00
|
|
|
};
|
2023-05-15 09:59:45 +00:00
|
|
|
|
2023-05-29 10:01:35 +00:00
|
|
|
vcc12v_dcin: vcc12v-dcin-regulator {
|
|
|
|
compatible = "regulator-fixed";
|
|
|
|
regulator-name = "vcc12v_dcin";
|
|
|
|
regulator-always-on;
|
|
|
|
regulator-boot-on;
|
|
|
|
regulator-min-microvolt = <12000000>;
|
|
|
|
regulator-max-microvolt = <12000000>;
|
|
|
|
};
|
2023-10-17 17:02:11 +00:00
|
|
|
};
|
2023-05-29 10:01:35 +00:00
|
|
|
|
2023-10-17 17:02:11 +00:00
|
|
|
&combphy2_psu {
|
|
|
|
status = "okay";
|
2023-05-15 09:59:45 +00:00
|
|
|
};
|
|
|
|
|
2023-05-18 15:39:30 +00:00
|
|
|
&fspim2_pins {
|
|
|
|
bootph-all;
|
|
|
|
};
|
|
|
|
|
2023-05-15 09:59:45 +00:00
|
|
|
&pinctrl {
|
2023-10-17 17:02:11 +00:00
|
|
|
usb {
|
2023-05-29 10:01:35 +00:00
|
|
|
usbc0_int: usbc0-int {
|
2023-10-17 17:02:11 +00:00
|
|
|
rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
|
2023-05-29 10:01:35 +00:00
|
|
|
};
|
|
|
|
};
|
2023-02-22 09:05:12 +00:00
|
|
|
};
|
|
|
|
|
2023-04-18 16:46:41 +00:00
|
|
|
&sdhci {
|
|
|
|
cap-mmc-highspeed;
|
|
|
|
mmc-ddr-1_8v;
|
|
|
|
mmc-hs200-1_8v;
|
|
|
|
};
|
2023-05-15 09:59:45 +00:00
|
|
|
|
2023-05-18 15:39:30 +00:00
|
|
|
&sfc {
|
|
|
|
bootph-pre-ram;
|
|
|
|
u-boot,spl-sfc-no-dma;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
pinctrl-0 = <&fspim2_pins>;
|
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
flash@0 {
|
|
|
|
bootph-pre-ram;
|
|
|
|
compatible = "jedec,spi-nor";
|
|
|
|
reg = <0>;
|
|
|
|
spi-max-frequency = <24000000>;
|
|
|
|
spi-rx-bus-width = <4>;
|
|
|
|
spi-tx-bus-width = <1>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-05-29 10:01:35 +00:00
|
|
|
&u2phy0 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&u2phy0_otg {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2023-09-05 11:47:35 +00:00
|
|
|
&u2phy1 {
|
2023-05-15 09:59:45 +00:00
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2023-09-05 11:47:35 +00:00
|
|
|
&u2phy1_otg {
|
2023-05-15 09:59:45 +00:00
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2023-10-17 17:02:11 +00:00
|
|
|
&usbdp_phy1 {
|
2023-05-15 09:59:45 +00:00
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2023-10-17 17:02:11 +00:00
|
|
|
&usbdp_phy1_u3 {
|
2023-05-15 09:59:45 +00:00
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2023-05-29 10:01:35 +00:00
|
|
|
&usbdp_phy0 {
|
|
|
|
orientation-switch;
|
2023-10-17 17:02:11 +00:00
|
|
|
mode-switch;
|
2023-05-29 10:01:35 +00:00
|
|
|
sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
|
|
|
|
sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
|
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
port {
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
2023-10-17 17:02:11 +00:00
|
|
|
|
|
|
|
usbdp_phy0_typec_ss: endpoint@0 {
|
2023-05-29 10:01:35 +00:00
|
|
|
reg = <0>;
|
2023-10-17 17:02:11 +00:00
|
|
|
remote-endpoint = <&usbc0_ss>;
|
2023-05-29 10:01:35 +00:00
|
|
|
};
|
|
|
|
|
2023-10-17 17:02:11 +00:00
|
|
|
usbdp_phy0_typec_sbu: endpoint@1 {
|
2023-05-29 10:01:35 +00:00
|
|
|
reg = <1>;
|
2023-10-17 17:02:11 +00:00
|
|
|
remote-endpoint = <&usbc0_sbu>;
|
2023-05-29 10:01:35 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&usbdp_phy0_u3 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2023-10-17 17:02:11 +00:00
|
|
|
&usb_host0_xhci {
|
|
|
|
usb-role-switch;
|
2023-05-29 10:01:35 +00:00
|
|
|
status = "okay";
|
|
|
|
|
2023-10-17 17:02:11 +00:00
|
|
|
port {
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
2023-05-29 10:01:35 +00:00
|
|
|
|
2023-10-17 17:02:11 +00:00
|
|
|
usb_host0_xhci_drd_sw: endpoint {
|
|
|
|
remote-endpoint = <&usbc0_hs>;
|
|
|
|
};
|
|
|
|
};
|
2023-05-29 10:01:35 +00:00
|
|
|
};
|
|
|
|
|
2023-10-17 17:02:11 +00:00
|
|
|
&usb_host1_xhci {
|
2023-05-29 10:01:35 +00:00
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2023-10-17 17:02:11 +00:00
|
|
|
&usb_host2_xhci {
|
|
|
|
status = "okay";
|
2023-05-29 10:01:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
&i2c4 {
|
2023-10-17 17:02:11 +00:00
|
|
|
pinctrl-names = "default";
|
2023-05-29 10:01:35 +00:00
|
|
|
pinctrl-0 = <&i2c4m1_xfer>;
|
|
|
|
status = "okay";
|
|
|
|
|
2023-10-17 17:02:11 +00:00
|
|
|
usbc0: usb-typec@22 {
|
2023-05-29 10:01:35 +00:00
|
|
|
compatible = "fcs,fusb302";
|
|
|
|
reg = <0x22>;
|
|
|
|
interrupt-parent = <&gpio3>;
|
|
|
|
interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
pinctrl-0 = <&usbc0_int>;
|
2023-10-17 17:02:11 +00:00
|
|
|
vbus-supply = <&vcc12v_dcin>;
|
2023-05-29 10:01:35 +00:00
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
usb_con: connector {
|
|
|
|
compatible = "usb-c-connector";
|
|
|
|
label = "USB-C";
|
|
|
|
data-role = "dual";
|
2023-10-17 17:02:11 +00:00
|
|
|
power-role = "sink";
|
2023-05-29 10:01:35 +00:00
|
|
|
try-power-role = "sink";
|
|
|
|
op-sink-microwatt = <1000000>;
|
|
|
|
sink-pdos =
|
2023-10-17 17:02:11 +00:00
|
|
|
<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>,
|
|
|
|
<PDO_VAR(5000, 20000, 5000)>;
|
2023-05-29 10:01:35 +00:00
|
|
|
|
|
|
|
ports {
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
|
|
|
|
|
|
|
port@0 {
|
|
|
|
reg = <0>;
|
2023-10-17 17:02:11 +00:00
|
|
|
usbc0_hs: endpoint {
|
|
|
|
remote-endpoint = <&usb_host0_xhci_drd_sw>;
|
2023-05-29 10:01:35 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
port@1 {
|
|
|
|
reg = <1>;
|
2023-10-17 17:02:11 +00:00
|
|
|
usbc0_ss: endpoint {
|
|
|
|
remote-endpoint = <&usbdp_phy0_typec_ss>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
port@2 {
|
|
|
|
reg = <2>;
|
|
|
|
usbc0_sbu: endpoint {
|
|
|
|
remote-endpoint = <&usbdp_phy0_typec_sbu>;
|
2023-05-29 10:01:35 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|