Commit ccdae3f5 authored by Angus Ainslie (Purism)'s avatar Angus Ainslie (Purism) Committed by Angus Ainslie

imx8mq-librem5-devkit.dts : turn on the USB sub-systems for the librem5 devkit

parent 0eeba1a4
......@@ -7,6 +7,7 @@
/dts-v1/;
#include "imx8mq.dtsi"
#include "dt-bindings/usb/pd.h"
/ {
model = "Purism Librem 5 devkit 1.0";
......@@ -616,6 +617,46 @@
};
};
typec_ptn5100: ptn5110@52 {
compatible = "nxp,ptn5110";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_typec>;
reg = <0x52>;
interrupt-parent = <&gpio3>;
interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
ss-sel-gpios = <&gpio3 12 GPIO_ACTIVE_HIGH>;
usb_con: connector {
compatible = "usb-c-connector";
label = "USB-C";
data-role = "dual";
power-role = "dual";
try-power-role = "sink";
source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)
PDO_VAR(5000, 12000, 2000)>;
op-sink-microwatt = <10000000>;
//init-vbus-sink;
//init-vbus-source;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
usb_con_hs: endpoint {
remote-endpoint = <&typec_hs>;
};
};
port@1 {
reg = <1>;
usb_con_ss: endpoint {
remote-endpoint = <&typec_ss>;
};
};
};
};
};
charger: charger@6b { /* bq25896 */
compatible = "ti,bq25890";
reg = <0x6b>;
......@@ -664,6 +705,34 @@
};
};
&usb3_phy0 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
typec_hs: endpoint {
remote-endpoint = <&usb_con_hs>;
};
};
port@1 {
reg = <1>;
typec_ss: endpoint {
remote-endpoint = <&usb_con_ss>;
};
};
};
&usb3_0 {
status = "okay";
};
&usb_dwc3_0 {
status = "okay";
extcon = <&typec_ptn5100>;
dr_mode = "otg";
};
&uart1 { /* console */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
......
......@@ -413,4 +413,95 @@
interrupt-parent = <&gic>;
};
};
usb3_phy0: phy0@381f0040 {
compatible = "fsl,imx8mq-usb-phy";
#phy-cells = <1>;
reg = <0x0 0x381f0040 0x0 0x40>;
clocks = <&clk IMX8MQ_CLK_USB1_PHY_ROOT>;
clock-names = "phy";
assigned-clocks = <&clk IMX8MQ_CLK_USB_PHY_REF>;
assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_100M>;
assigned-clock-rates = <100000000>;
status = "disabled";
};
usb3_0: usb0@38100000 {
compatible = "fsl,imx8mq-dwc3";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x0 0x38100000 0x0 0x38100000 0x0 0x10000>;
clocks = <&clk IMX8MQ_CLK_USB1_CTRL_ROOT>;
clock-names = "usb1_ctrl_root_clk";
assigned-clocks = <&clk IMX8MQ_CLK_USB_BUS>,
<&clk IMX8MQ_CLK_USB_CORE_REF>;
assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_500M>,
<&clk IMX8MQ_SYS1_PLL_100M>;
assigned-clock-rates = <500000000>, <100000000>;
status = "disabled";
usb_dwc3_0: dwc3 {
compatible = "snps,dwc3";
reg = <0x0 0x38100000 0x0 0x10000>;
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>;
/* TODO: check these clock assignments */
clocks = <&clk IMX8MQ_CLK_USB1_CTRL_ROOT>,
<&clk IMX8MQ_CLK_USB_BUS>,
<&clk IMX8MQ_CLK_USB_CORE_REF>;
clock-names = "ref", "bus_early", "suspend";
phys = <&usb3_phy0 0>, <&usb3_phy0 1>;
phy-names = "usb2-phy", "usb3-phy";
snps,power-down-scale = <2>;
usb3-resume-missing-cas;
usb3-lpm-capable;
status = "disabled";
};
};
usb3_phy1: phy1@382f0040 {
compatible = "fsl,imx8mq-usb-phy";
#phy-cells = <1>;
reg = <0x0 0x382f0040 0x0 0x40>;
clocks = <&clk IMX8MQ_CLK_USB2_PHY_ROOT>;
clock-names = "phy";
assigned-clocks = <&clk IMX8MQ_CLK_USB_PHY_REF>;
assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_100M>;
assigned-clock-rates = <100000000>;
status = "disabled";
};
usb3_1: usb1@38200000 {
compatible = "fsl,imx8mq-dwc3";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x0 0x38200000 0x0 0x38200000 0x0 0x10000>;
clocks = <&clk IMX8MQ_CLK_USB2_CTRL_ROOT>;
clock-names = "usb2_ctrl_root_clk";
assigned-clocks = <&clk IMX8MQ_CLK_USB_BUS>,
<&clk IMX8MQ_CLK_USB_CORE_REF>;
assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_500M>,
<&clk IMX8MQ_SYS1_PLL_100M>;
assigned-clock-rates = <500000000>, <100000000>;
status = "disabled";
usb_dwc3_1: dwc3 {
compatible = "snps,dwc3";
reg = <0x0 0x38200000 0x0 0x10000>;
interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>;
/* TODO: check these clock assignments */
clocks = <&clk IMX8MQ_CLK_USB2_CTRL_ROOT>,
<&clk IMX8MQ_CLK_USB_BUS>,
<&clk IMX8MQ_CLK_USB_CORE_REF>;
clock-names = "ref", "bus_early", "suspend";
phys = <&usb3_phy1 0>, <&usb3_phy1 1>;
phy-names = "usb2-phy", "usb3-phy";
snps,power-down-scale = <2>;
usb3-resume-missing-cas;
usb3-lpm-capable;
status = "disabled";
};
};
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment