usbdrd30: usbdrd{
compatible = "starfive,jh7110-cdns3";
+ reg = <0x0 0x10210000 0x0 0x1000>;
clocks = <&clkgen JH7110_USB_125M>,
<&clkgen JH7110_USB0_CLK_APP_125>,
<&clkgen JH7110_USB0_CLK_LPM>,
<&clkgen JH7110_USB0_CLK_STB>,
<&clkgen JH7110_USB0_CLK_USB_APB>,
<&clkgen JH7110_USB0_CLK_AXI>,
- <&clkgen JH7110_USB0_CLK_UTMI_APB>;
- clock-names = "125m","app","lpm","stb","apb","axi","utmi";
+ <&clkgen JH7110_USB0_CLK_UTMI_APB>,
+ <&clkgen JH7110_PCIE0_CLK_APB>;
+ clock-names = "125m","app","lpm","stb","apb","axi","utmi", "phy";
resets = <&rstgen RSTN_U0_CDN_USB_PWRUP>,
<&rstgen RSTN_U0_CDN_USB_APB>,
<&rstgen RSTN_U0_CDN_USB_AXI>,
- <&rstgen RSTN_U0_CDN_USB_UTMI_APB>;
- reset-names = "pwrup","apb","axi","utmi";
+ <&rstgen RSTN_U0_CDN_USB_UTMI_APB>,
+ <&rstgen RSTN_U0_PLDA_PCIE_APB>;
+ reset-names = "pwrup","apb","axi","utmi", "phy";
starfive,stg-syscon = <&stg_syscon 0x4 0xc4 0x148 0x1f4>;
starfive,sys-syscon = <&sys_syscon 0x18>;
status = "disabled";
#define PCIE_USB3_RX_STANDBY_MASK 0x80
#define PCIE_USB3_PHY_ENABLE_SHIFT 0x4
#define PCIE_USB3_PHY_ENABLE_MASK 0x10
+#define PCIE_USB3_PHY_PLL_CTL_OFF (0x1f * 4)
+
#define USB_125M_CLK_RATE 125000000
struct device_node *node = pdev->dev.of_node;
struct cdns_starfive *data;
struct of_phandle_args args;
+ void __iomem *phybase;
int ret;
data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
goto exit;
}
+ /* Configuare spread-spectrum mode: down-spread-Spectrum */
+ phybase = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(phybase)) {
+ dev_err(dev, "Can't map IOMEM resource\n");
+ ret = PTR_ERR(phybase);
+ goto exit;
+ }
+ writel(BIT(4), (phybase + PCIE_USB3_PHY_PLL_CTL_OFF));
+
ret = of_platform_populate(node, NULL, NULL, dev);
if (ret) {
dev_err(dev, "Failed to create children: %d\n", ret);