Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Oct 2022 23:00:19 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        freebsd-arm <freebsd-arm@freebsd.org>
Cc:        Emmanuel Vadot <manu@freebsd.org>
Subject:   Re: FYI: Rock64 USB3 port no longer works for main [so: 14] (looks like dtb changes invalidating use of the old .dtbo and needing kernel changes)
Message-ID:  <665C125A-3E2B-408F-8F6E-B2D23237F06A@yahoo.com>
In-Reply-To: <8A639ABB-D8CC-47D6-A106-A5E2463E7AEE@yahoo.com>
References:  <8A639ABB-D8CC-47D6-A106-A5E2463E7AEE@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Well, turns out that part of the "Import device-tree files
from Linux 5.14" is:

=
https://cgit.freebsd.org/src/commit/sys/contrib/device-tree/src/arm64/rock=
chip/rk3328-rock64.dts?id=3D5956d97f4b32

which has:

diff --git =
a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock64.dts =
b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock64.dts
index 3bef1f39bc6e..1b0f7e4551ea 100644
--- a/sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock64.dts
+++ b/sys/contrib/device-tree/src/arm64/rockchip/rk3328-rock64.dts
@@ -381,6 +381,11 @@
 	status =3D "okay";
 };
=20
+&usbdrd3 {
+	dr_mode =3D "host";
+	status =3D "okay";
+};
+
 &usb_host0_ehci {
 	status =3D "okay";
 };

usbdrd3 is for USB3, so "host" now has a sort of dtb change
in the interfacing for supporting host-mode USB3. The old:

/usr/main-src/sys/dts/arm64/overlays/rk3328-dwc3.dtso

has, in part:

        usbdrd3: usb@ff600000 {
                compatible =3D "rockchip,rk3328-dwc3";
                clocks =3D <&cru SCLK_USB3OTG_REF>, <&cru =
SCLK_USB3OTG_SUSPEND>,
                         <&cru ACLK_USB3OTG>;
                clock-names =3D "ref_clk", "suspend_clk",
                              "bus_clk";
                #address-cells =3D <2>;
                #size-cells =3D <2>;
                ranges;
                status =3D "okay";

                usbdrd_dwc3: dwc3@ff600000 {
                        compatible =3D "snps,dwc3";
                        reg =3D <0x0 0xff600000 0x0 0x100000>;
                        interrupts =3D <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
                        dr_mode =3D "host";
                        phy_type =3D "utmi_wide";
                        snps,dis_enblslpm_quirk;
                        snps,dis-u2-freeclk-exists-quirk;
                        snps,dis_u2_susphy_quirk;
                        snps,dis_u3_susphy_quirk;
                        snps,dis-del-phy-power-chg-quirk;
                        snps,dis-tx-ipgap-linecheck-quirk;
                        status =3D "okay";
                };
        };

which looks to me to likely now conflict with the below --given
the added "host" usage as of 5.14 reported above:

/usr/main-src/sys/contrib/device-tree/src/arm64/rockchip/rk3328.dtsi

that, as of the 5.13 import, has:

        usbdrd3: usb@ff600000 {
                compatible =3D "rockchip,rk3328-dwc3", "snps,dwc3";
                reg =3D <0x0 0xff600000 0x0 0x100000>;
                interrupts =3D <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
                clocks =3D <&cru SCLK_USB3OTG_REF>, <&cru =
SCLK_USB3OTG_SUSPEND>,
                         <&cru ACLK_USB3OTG>;
                clock-names =3D "ref_clk", "suspend_clk",
                              "bus_clk";
                dr_mode =3D "otg";
                phy_type =3D "utmi_wide";
                snps,dis-del-phy-power-chg-quirk;
                snps,dis_enblslpm_quirk;
                snps,dis-tx-ipgap-linecheck-quirk;
                snps,dis-u2-freeclk-exists-quirk;
                snps,dis_u2_susphy_quirk;
                snps,dis_u3_susphy_quirk;
                status =3D "disabled";
        };

My guess would be that some kernel changes are required
in order to track this structural changes, not just
avoiding the old .dtbo . Testing showed that disabling
the load of the .dtbo was insufficient to fix things.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?665C125A-3E2B-408F-8F6E-B2D23237F06A>