arm64: dts: rockchip: helios64: fixup USB setup
Subsystems (2)
PATCH 1/4 arm64: dts: rockchip: helios64: fixup USB setup
Without the usbdrd_dwc3_1 node defined u-boot will throw an error and reset the system. All other rk3399 systems use this format
--- arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts +4 -4
@@ -490,9 +490,9 @@ &uart2 { &usbdrd3_1 { status = "okay"; +}; - usb@fe900000 { - dr_mode = "host"; - status = "okay"; - }; +&usbdrd_dwc3_1 { + dr_mode = "host"; + status = "okay"; };
Signature · 1 line
2.31.1
PATCH 2/4 arm64: dts: rockchip: helios64: set stdout-path
set the default output path to uart2
--- arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts +4 -0
@@ -43,6 +43,10 @@ avdd_1v8_s0: avdd-1v8-s0 { vin-supply = <&vcc3v3_sys_s3>; }; + chosen { + stdout-path = "serial2:1500000n8"; + }; + clkin_gmac: external-gmac-clock { compatible = "fixed-clock"; clock-frequency = <125000000>;
Signature · 1 line
2.31.1
PATCH 3/4 arm64: dts: rockchip: helios64: add SPI support
In reply to Dennis Gilmoreadd SPI support for the helios64, u-boot can live in spi1, spi2 is user accessible, spi5 is for the sata controller rom.
https://wiki.kobol.io/helios64/spi/
--- .../dts/rockchip/rk3399-kobol-helios64.dts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts +24 -0
@@ -21,6 +21,9 @@ / { aliases { mmc0 = &sdmmc; mmc1 = &sdhci; + spi1 = &spi1; + spi2 = &spi2; + spi5 = &spi5; }; avdd_0v9_s0: avdd-0v9-s0 {
@@ -473,6 +476,27 @@ &sdmmc { status = "okay"; }; +&spi1 { + status = "okay"; + + spiflash: flash@0 { + compatible = "jedec,spi-nor"; + reg = <0x0>; + spi-max-frequency = <25000000>; + status = "okay"; + m25p,fast-read; + }; +}; + +/* UEXT connector */ +&spi2 { + status = "okay"; +}; + +&spi5 { + status = "okay"; +}; + &tcphy1 { /* phy for &usbdrd_dwc3_1 */ status = "okay";
Signature · 1 line
2.31.1
PATCH 4/4 arm64: dts: rockchip: helios64: enable tsadc on helios64
In reply to Dennis GilmoreEnable the tsadc thermal controller on the helios64
--- arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts +8 -0
@@ -502,6 +502,14 @@ &tcphy1 { status = "okay"; }; +&tsadc { + /* tshut mode 0:CRU 1:GPIO */ + rockchip,hw-tshut-mode = <1>; + /* tshut polarity 0:LOW 1:HIGH */ + rockchip,hw-tshut-polarity = <1>; + status = "okay"; +}; + &u2phy1 { status = "okay";
Signature · 1 line
2.31.1
Hello,
Quoted 2 lines · Dennis Gilmore
Without the
usbdrd_dwc3_1node defined u-boot will throw an error and reset the system.
I wonder if this should better be fixed in u-boot then?!
Quoted 1 line
All other rk3399 systems use this format
This is true for the dwc nodes, however for the usb2 nodes there are several that use this idiom (and even repeat the label name), see for example the &u2phy0 node in arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi .
In my eyes it's a bit ugly to have the two nodes as separate entities and on the same indentation level in the machine dts given that one is the parent of the other and enabling USB needs both status settings.
Best regards
Uwe
Quoted 7 lines · Uwe Kleine-König
Hello,
Quoted 3 lines · Dennis Gilmore
Without the
usbdrd_dwc3_1node defined u-boot will throw an error and
reset the system.
Quoted 9 lines
I wonder if this should better be fixed in u-boot then?!
Quoted 1 line
All other rk3399 systems use this format
This is true for the dwc nodes, however for the usb2 nodes there are several that use this idiom (and even repeat the label name), see for example the &u2phy0 node in
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi.
looking at that file is where I got the idea to set it up as I have proposed, it follows the format I have submitted
Dennis
Quoted 8 lines
In my eyes it's a bit ugly to have the two nodes as separate entities and on the same indentation level in the machine dts given that one is
the parent of the other and enabling USB needs both status settings.Best regards
Uwe
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Hello Dennis,
Quoted 12 lines · Dennis Gilmore
Quoted 11 lines · Uwe Kleine-König
Hello,
Quoted 3 lines · Dennis Gilmore
Without the
usbdrd_dwc3_1node defined u-boot will throw an error and
reset the system.I wonder if this should better be fixed in u-boot then?!
Quoted 1 line
All other rk3399 systems use this format
Quoted 8 lines
Quoted 5 lines
This is true for the dwc nodes, however for the usb2 nodes there are several that use this idiom (and even repeat the label name), see for example the &u2phy0 node in
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi.looking at that file is where I got the idea to set it up as I have proposed, it follows the format I have submitted
I guess you didn't read exactly what I wrote and only looked at &usbdrd* but not &u2phy0.
Best regards
Uwe
Quoted 24 lines · Uwe Kleine-König
Hello Dennis,
Quoted 21 lines · Dennis Gilmore
Quoted 19 lines · Uwe Kleine-König
Hello,
Quoted 4 lines · Dennis Gilmore
Without the
usbdrd_dwc3_1node defined u-boot will throw an error
and
reset the system.I wonder if this should better be fixed in u-boot then?!
Quoted 1 line
All other rk3399 systems use this format
This is true for the dwc nodes, however for the usb2 nodes there are
several that use this idiom (and even repeat the label name), see for
example the &u2phy0 node inarch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi.
Quoted 6 lines
Quoted 2 lines
looking at that file is where I got the idea to set it up as I have proposed, it follows the format I have submitted
I guess you didn't read exactly what I wrote and only looked at &usbdrd*
but not &u2phy0.
Hi Uwe,
I did read what you pointed at, the issue is that is already defined in arch/arm64/boot/dts/rockchip/rk3399.dtsi and all that is needed it to set the status to okay and minor enablement. as DTC merges all the snippets together they end up in the right place and doing the right thing, the approach you took is different to all the other boards I looked at and seemingly causes issues in u-boot. I did not get far enough in booting to verify the state in linux as I am updating u-boot as I go and testing using u-boots dtb for simplicty sake. It quite likely is a bug in u-boot that it resets the system, at the same time I do not think that doing it differently to how the other boards are implemented is right either. There is still a lot of the hardware in the system that is not defined in the devicetree file, including a lot of the usb stack.
Dennis
Quoted 2 lines · Dennis Gilmore
Without the
usbdrd_dwc3_1node defined u-boot will throw an error and reset the system. All other rk3399 systems use this format
This doesn't make much sense - the usbdrd_dwc3_1 label is defined in rk3399.dtsi either way, and the compiled DTBs before and after are identical :/
If U-Boot is doing something funny with labels and symbols to give itself some kind of fragile dependency, that probably wants to be fixed in U-Boot.
Robin.
Quoted 24 lines
Signed-off-by Dennis Gilmore <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts +4
-4@@ -490,9 +490,9 @@ &uart2 { &usbdrd3_1 { status = "okay"; +}; - usb@fe900000 { - dr_mode = "host"; - status = "okay"; - }; +&usbdrd_dwc3_1 { + dr_mode = "host"; + status = "okay"; };