convert rockchip,dwc3.txt to yaml
Subsystems (4)
v6 cover convert rockchip,dwc3.txt to yaml
The conversion of rockchip,dwc3.txt to yaml was added to linux-next, but the necessary changes for rk3399 are still pending.
For rk3399 dwc3 usb the wrapper node for only clocks makes no sense, so that was removed in the YAML example.
Now dtbs_check still generates notifications for the compatibility string in the dts files that doesn't match, because it changed from "rockchip,rk3399-dwc3" to "rockchip,rk3399-dwc3", "snps,dwc3".
The problem is to keep compatible with old device trees. I.e. a device running an older device tree should still work with newer kernels.
Comment by Rob in version 3:
Presumably you are getting lucky here (with link order). The kernel has no logic to decide which driver to bind to if there are 2 matching drivers. If we did, it would probably be the opposite of what you want here as we'd pick the most specific match. This driver should probably bail probe if no dwc3 child node.
Please advise how to move forward with this serie.
Changed V6:
rebase
remove accepted patches from serie
Changed V5:
add select
Changed V4:
removed patch "of-simple: add compatible for rk3328" add patch "of-simple: bail probe if no dwc3 child node"
Changed V3:
remove aclk_usb3_rksoc_axi_perf
remove aclk_usb3
Changed V2:
remove node wrapper
Johan Jonker (3):
usb: dwc3: of-simple: bail probe if no dwc3 child node
arm64: dts: rockchip: restyle rk3399 usbdrd3_0 node
arm64: dts: rockchip: restyle rk3399 usbdrd3_1 node
Wu Liang feng (1):
arm64: dts: rockchip: optimize clks for rk3399 dwc3
arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 4 +- arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 12 +-- .../boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 6 +- arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 6 +- arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts | 12 +-- .../boot/dts/rockchip/rk3399-khadas-edge.dtsi | 12 +-- arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts | 12 +-- arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi | 8 -- arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts | 12 +-- .../boot/dts/rockchip/rk3399-pinebook-pro.dts | 8 -- .../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 4 - arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6 +- arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 10 +-- arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 12 +-- arch/arm64/boot/dts/rockchip/rk3399-rock960.dts | 4 +- arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 8 -- arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 12 +-- arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 12 +-- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 86 ++++++++-------------- .../boot/dts/rockchip/rk3399pro-vmarc-som.dtsi | 4 - drivers/usb/dwc3/dwc3-of-simple.c | 4 + 22 files changed, 59 insertions(+), 197 deletions(-)
Signature · 1 line
2.11.0
PATCH v6 1/4 usb: dwc3: of-simple: bail probe if no dwc3 child node
For some of the dwc3-of-simple compatible SoCs we don't want to bind this driver to a dwc3 node, but bind that node to the 'snps,dwc3' driver instead. The kernel has no logic to decide which driver to bind to if there are 2 matching drivers, so bail probe if no dwc3 child node.
--- drivers/usb/dwc3/dwc3-of-simple.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/dwc3/dwc3-of-simple.c +4 -0
@@ -38,6 +38,10 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)int ret; +/* Bail probe if no dwc3 child node. */ +if (!of_get_compatible_child (dev->of_node,"snps,dwc3" )) +return -ENODEV ; + simple =devm_kzalloc (dev,sizeof (*simple),GFP_KERNEL );if (!simple)return -ENOMEM ;
Signature · 1 line
2.11.0
Greg KH
maintainerRe: [PATCH v6 1/4] usb: dwc3: of-simple: bail probe if no dwc3 child node
Quoted 17 lines · Johan Jonker
For some of the dwc3-of-simple compatible SoCs we don't want to bind this driver to a dwc3 node, but bind that node to the 'snps,dwc3' driver instead. The kernel has no logic to decide which driver to bind to if there are 2 matching drivers, so bail probe if no dwc3 child node.
Signed-off-by Johan Jonker <[email protected]>--- drivers/usb/dwc3/dwc3-of-simple.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/usb/dwc3/dwc3-of-simple.c +0
-0
drivers/usb/dwc3/dwc3-of-simple.c static int dwc3_of_simple_probe(struct platform_device *pdev) · line 43
Quoted 6 lines
drivers/usb/dwc3/dwc3-of-simple.c +3
-0@@ -38,6 +38,10 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)int ret; +/* Bail probe if no dwc3 child node. */ +if (!of_get_compatible_child (dev->of_node,"snps,dwc3" )) +return -ENODEV ;
Why is this part of the "convert to yaml" patch series? Shouldn't this be a separate, independant patch?
thanks,
greg k-h
Re: [PATCH v6 1/4] usb: dwc3: of-simple: bail probe if no dwc3 child node
Quoted 21 lines · Greg KH
Quoted 20 lines · Johan Jonker
For some of the dwc3-of-simple compatible SoCs we don't want to bind this driver to a dwc3 node, but bind that node to the 'snps,dwc3' driver instead. The kernel has no logic to decide which driver to bind to if there are 2 matching drivers, so bail probe if no dwc3 child node.
Signed-off-by Johan Jonker <[email protected]>--- drivers/usb/dwc3/dwc3-of-simple.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/usb/dwc3/dwc3-of-simple.c +0
-0@@ -38,6 +38,10 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)int ret;
Quoted 7 lines
drivers/usb/dwc3/dwc3-of-simple.c static int dwc3_of_simple_probe(struct platform_device *pdev) · line 43
Quoted 3 lines
drivers/usb/dwc3/dwc3-of-simple.c +3
-0+/* Bail probe if no dwc3 child node. */ +if (!of_get_compatible_child (dev->of_node,"snps,dwc3" )) +return -ENODEV ;Why is this part of the "convert to yaml" patch series? Shouldn't this be a separate, independant patch?
independent
Hi Greg,
As pointed out by Rob in the v3 review process the YAML conversion has some side effects for new dt files. A good habit is to fix things before they become in effect. That's why this patch is placed before the dtsi changes and why Heiko asked to have a look at it.
For the sake of completeness there are other less optimal options:
- remove rk3399 support from dwc3-of-simple.c
- unselect CONFIG_USB_DWC3_OF_SIMPLE for new rk3399 device trees
In that case at least have it on record why USB maintainers didn't apply it in case someone else start to complain about it later when Heiko goes ahead with it.
Johan Jonker
Quoted 5 lines
thanks,
greg k-h
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v6 2/4 arm64: dts: rockchip: optimize clks for rk3399 dwc3
In reply to Johan JonkerFrom: Wu Liang feng <[email protected]>
Remove unnecessary clocks, refer to rk3399 TRM, aclk_usb3 is the parent of aclk_usb3otg0/1 and aclk_usb3_grf, and we will enable aclk_usb3otg0/1 and aclk_usb3_grf, so don't need to enable aclk_usb3 again. In addition, the aclk_usb3_rksoc_axi_perf clk is used for usb3 performance monitor module which we don't use now, so don't need to enable it.
--- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +4 -8
@@ -370,11 +370,9 @@ #size-cells = <2>; ranges; clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>, - <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_RKSOC_AXI_PERF>, - <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>; + <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_GRF>; clock-names = "ref_clk", "suspend_clk", - "bus_clk", "aclk_usb3_rksoc_axi_perf", - "aclk_usb3", "grf_clk"; + "bus_clk", "grf_clk"; resets = <&cru SRST_A_USB3_OTG0>; reset-names = "usb3-otg"; status = "disabled";
@@ -406,11 +404,9 @@ #size-cells = <2>; ranges; clocks = <&cru SCLK_USB3OTG1_REF>, <&cru SCLK_USB3OTG1_SUSPEND>, - <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_RKSOC_AXI_PERF>, - <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>; + <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_GRF>; clock-names = "ref_clk", "suspend_clk", - "bus_clk", "aclk_usb3_rksoc_axi_perf", - "aclk_usb3", "grf_clk"; + "bus_clk", "grf_clk"; resets = <&cru SRST_A_USB3_OTG1>; reset-names = "usb3-otg"; status = "disabled";
Signature · 1 line
2.11.0
PATCH v6 3/4 arm64: dts: rockchip: restyle rk3399 usbdrd3_0 node
In reply to Johan JonkerFor rk3399 dwc3 usb the wrapper node for only clocks makes no sense, so restyle the rk3399 usbdrd3_0 node before more new SoC types are added with the same IP.
---
Changed V6:
rebase
Changed V3:
remove aclk_usb3_rksoc_axi_perf
remove aclk_usb3
--- arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts | 6 +--- .../boot/dts/rockchip/rk3399-khadas-edge.dtsi | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi | 4 --- arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts | 6 +--- .../boot/dts/rockchip/rk3399-pinebook-pro.dts | 4 --- .../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 4 --- arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 4 --- arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-rock960.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 4 --- arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 6 +--- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 37 ++++++++-------------- .../boot/dts/rockchip/rk3399pro-vmarc-som.dtsi | 4 --- 19 files changed, 25 insertions(+), 96 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-ficus.dts +1 -1
@@ -153,7 +153,7 @@ status = "okay"; }; -&usbdrd_dwc3_0 { +&usbdrd3_0 { dr_mode = "host"; };
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +1 -5
@@ -773,12 +773,8 @@ }; &usbdrd3_0 { - status = "okay"; -}; - -&usbdrd_dwc3_0 { - status = "okay"; dr_mode = "otg"; + status = "okay"; }; &usbdrd3_1 {
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi +1 -5
@@ -618,13 +618,9 @@ ap_i2c_audio: &i2c8 { }; &usbdrd3_0 { - status = "okay"; + dr_mode = "host"; extcon = <&usbc_extcon0>; -}; - -&usbdrd_dwc3_0 { status = "okay"; - dr_mode = "host"; }; &vopb {
arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts +1 -5
@@ -731,12 +731,8 @@ }; &usbdrd3_0 { - status = "okay"; -}; - -&usbdrd_dwc3_0 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &usbdrd3_1 {
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi +1 -5
@@ -797,12 +797,8 @@ }; &usbdrd3_0 { - status = "okay"; -}; - -&usbdrd_dwc3_0 { - status = "okay"; dr_mode = "otg"; + status = "okay"; }; &usbdrd3_1 {
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts +1 -5
@@ -611,12 +611,8 @@ }; &usbdrd3_0 { - status = "okay"; -}; - -&usbdrd_dwc3_0 { - status = "okay"; dr_mode = "otg"; + status = "okay"; }; &usbdrd3_1 {
arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts +1 -1
@@ -124,7 +124,7 @@ status = "disabled"; }; -&usbdrd_dwc3_0 { +&usbdrd3_0 { dr_mode = "host"; };
arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi +0 -4
@@ -714,10 +714,6 @@ status = "okay"; }; -&usbdrd_dwc3_0 { - status = "okay"; -}; - &usbdrd_dwc3_1 { dr_mode = "host"; status = "okay";
arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts +1 -5
@@ -854,12 +854,8 @@ }; &usbdrd3_0 { - status = "okay"; -}; - -&usbdrd_dwc3_0 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &usbdrd3_1 {
arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts +0 -4
@@ -1086,10 +1086,6 @@ }; &usbdrd3_0 { - status = "okay"; -}; - -&usbdrd_dwc3_0 { dr_mode = "host"; status = "okay"; };
arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts +0 -4
@@ -223,10 +223,6 @@ }; &usbdrd3_0 { - status = "okay"; -}; - -&usbdrd_dwc3_0 { dr_mode = "otg"; status = "okay"; };
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +0 -4
@@ -792,10 +792,6 @@ status = "okay"; }; -&usbdrd_dwc3_0 { - status = "okay"; -}; - &usbdrd3_1 { status = "okay"; };
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +1 -5
@@ -668,12 +668,8 @@ }; &usbdrd3_0 { - status = "okay"; -}; - -&usbdrd_dwc3_0 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &usbdrd3_1 {
arch/arm64/boot/dts/rockchip/rk3399-rock960.dts +1 -1
@@ -139,7 +139,7 @@ status = "okay"; }; -&usbdrd_dwc3_0 { +&usbdrd3_0 { dr_mode = "otg"; };
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +0 -4
@@ -635,10 +635,6 @@ status = "okay"; }; -&usbdrd_dwc3_0 { - status = "okay"; -}; - &usbdrd3_1 { status = "okay"; };
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi +1 -5
@@ -830,12 +830,8 @@ }; &usbdrd3_0 { - status = "okay"; -}; - -&usbdrd_dwc3_0 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &usbdrd3_1 {
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +1 -5
@@ -614,12 +614,8 @@ }; &usbdrd3_0 { - status = "okay"; -}; - -&usbdrd_dwc3_0 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &usbdrd3_1 {
arch/arm64/boot/dts/rockchip/rk3399.dtsi +13 -24
@@ -365,37 +365,26 @@ }; usbdrd3_0: usb@fe800000 { - compatible = "rockchip,rk3399-dwc3"; - #address-cells = <2>; - #size-cells = <2>; - ranges; + compatible = "rockchip,rk3399-dwc3", "snps,dwc3"; + reg = <0x0 0xfe800000 0x0 0x100000>; + interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>; clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>, <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_GRF>; clock-names = "ref_clk", "suspend_clk", "bus_clk", "grf_clk"; + dr_mode = "otg"; + phys = <&u2phy0_otg>, <&tcphy0_usb3>; + phy-names = "usb2-phy", "usb3-phy"; + phy_type = "utmi_wide"; + power-domains = <&power RK3399_PD_USB3>; resets = <&cru SRST_A_USB3_OTG0>; reset-names = "usb3-otg"; + 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; status = "disabled"; - - usbdrd_dwc3_0: usb@fe800000 { - compatible = "snps,dwc3"; - reg = <0x0 0xfe800000 0x0 0x100000>; - interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>; - clocks = <&cru SCLK_USB3OTG0_REF>, <&cru ACLK_USB3OTG0>, - <&cru SCLK_USB3OTG0_SUSPEND>; - clock-names = "ref", "bus_early", "suspend"; - dr_mode = "otg"; - phys = <&u2phy0_otg>, <&tcphy0_usb3>; - phy-names = "usb2-phy", "usb3-phy"; - phy_type = "utmi_wide"; - snps,dis_enblslpm_quirk; - snps,dis-u2-freeclk-exists-quirk; - snps,dis_u2_susphy_quirk; - snps,dis-del-phy-power-chg-quirk; - snps,dis-tx-ipgap-linecheck-quirk; - power-domains = <&power RK3399_PD_USB3>; - status = "disabled"; - }; }; usbdrd3_1: usb@fe900000 {
arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi +0 -4
@@ -454,10 +454,6 @@ status = "okay"; }; -&usbdrd_dwc3_0 { - status = "okay"; -}; - &vbus_host { enable-active-high; gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */
Signature · 1 line
2.11.0
PATCH v6 4/4 arm64: dts: rockchip: restyle rk3399 usbdrd3_1 node
In reply to Johan JonkerFor rk3399 dwc3 usb the wrapper node for only clocks makes no sense, so restyle the rk3399 usbdrd3_1 node before more new SoC types are added with the same IP.
---
Changed V3:
remove aclk_usb3_rksoc_axi_perf
remove aclk_usb3
--- arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 6 +--- .../boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts | 6 +--- .../boot/dts/rockchip/rk3399-khadas-edge.dtsi | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi | 4 --- arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts | 6 +--- .../boot/dts/rockchip/rk3399-pinebook-pro.dts | 4 --- arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-rock960.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 4 --- arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 6 +--- arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 6 +--- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 37 ++++++++-------------- 17 files changed, 26 insertions(+), 93 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-ficus.dts +1 -1
@@ -157,7 +157,7 @@ dr_mode = "host"; }; -&usbdrd_dwc3_1 { +&usbdrd3_1 { dr_mode = "host"; };
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts +1 -5
@@ -778,12 +778,8 @@ }; &usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &vopb {
arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi +1 -5
@@ -351,13 +351,9 @@ ap_i2c_tp: &i2c5 { }; &usbdrd3_1 { - status = "okay"; + dr_mode = "host"; extcon = <&usbc_extcon1>; -}; - -&usbdrd_dwc3_1 { status = "okay"; - dr_mode = "host"; }; &pinctrl {
arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts +1 -5
@@ -736,12 +736,8 @@ }; &usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &vopb {
arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi +1 -5
@@ -802,12 +802,8 @@ }; &usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &vopb {
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts +1 -5
@@ -616,12 +616,8 @@ }; &usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &vopb {
arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi +0 -4
@@ -711,10 +711,6 @@ }; &usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { dr_mode = "host"; status = "okay"; };
arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts +1 -5
@@ -859,12 +859,8 @@ }; &usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &vopb {
arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts +0 -4
@@ -1091,10 +1091,6 @@ }; &usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { dr_mode = "host"; status = "okay"; };
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +1 -5
@@ -466,12 +466,8 @@ }; &usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &usb_host1_ehci {
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1 -5
@@ -793,12 +793,8 @@ }; &usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &vopb {
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +1 -5
@@ -673,12 +673,8 @@ }; &usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &vopb {
arch/arm64/boot/dts/rockchip/rk3399-rock960.dts +1 -1
@@ -143,7 +143,7 @@ dr_mode = "otg"; }; -&usbdrd_dwc3_1 { +&usbdrd3_1 { dr_mode = "host"; };
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +0 -4
@@ -639,10 +639,6 @@ status = "okay"; }; -&usbdrd_dwc3_1 { - status = "okay"; -}; - &vopb { status = "okay"; };
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi +1 -5
@@ -835,12 +835,8 @@ }; &usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &vopb {
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +1 -5
@@ -619,12 +619,8 @@ }; &usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - status = "okay"; dr_mode = "host"; + status = "okay"; }; &vopb {
arch/arm64/boot/dts/rockchip/rk3399.dtsi +13 -24
@@ -388,37 +388,26 @@ }; usbdrd3_1: usb@fe900000 { - compatible = "rockchip,rk3399-dwc3"; - #address-cells = <2>; - #size-cells = <2>; - ranges; + compatible = "rockchip,rk3399-dwc3", "snps,dwc3"; + reg = <0x0 0xfe900000 0x0 0x100000>; + interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>; clocks = <&cru SCLK_USB3OTG1_REF>, <&cru SCLK_USB3OTG1_SUSPEND>, <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_GRF>; clock-names = "ref_clk", "suspend_clk", "bus_clk", "grf_clk"; + dr_mode = "otg"; + phys = <&u2phy1_otg>, <&tcphy1_usb3>; + phy-names = "usb2-phy", "usb3-phy"; + phy_type = "utmi_wide"; + power-domains = <&power RK3399_PD_USB3>; resets = <&cru SRST_A_USB3_OTG1>; reset-names = "usb3-otg"; + 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; status = "disabled"; - - usbdrd_dwc3_1: usb@fe900000 { - compatible = "snps,dwc3"; - reg = <0x0 0xfe900000 0x0 0x100000>; - interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>; - clocks = <&cru SCLK_USB3OTG1_REF>, <&cru ACLK_USB3OTG1>, - <&cru SCLK_USB3OTG1_SUSPEND>; - clock-names = "ref", "bus_early", "suspend"; - dr_mode = "otg"; - phys = <&u2phy1_otg>, <&tcphy1_usb3>; - phy-names = "usb2-phy", "usb3-phy"; - phy_type = "utmi_wide"; - snps,dis_enblslpm_quirk; - snps,dis-u2-freeclk-exists-quirk; - snps,dis_u2_susphy_quirk; - snps,dis-del-phy-power-chg-quirk; - snps,dis-tx-ipgap-linecheck-quirk; - power-domains = <&power RK3399_PD_USB3>; - status = "disabled"; - }; }; cdn_dp: dp@fec00000 {
Signature · 1 line
2.11.0
Quoted 17 lines
From: Johan Jonker <[email protected]>
Date: Thu, 1 Apr 2021 23:36:48 +0200The conversion of rockchip,dwc3.txt to yaml was added to linux-next, but the necessary changes for rk3399 are still pending.
For rk3399 dwc3 usb the wrapper node for only clocks makes no sense, so that was removed in the YAML example.
Now
dtbs_checkstill generates notifications for the compatibility string in the dts files that doesn't match, because it changed from "rockchip,rk3399-dwc3" to "rockchip,rk3399-dwc3", "snps,dwc3".The problem is to keep compatible with old device trees. I.e. a device running an older device tree should still work with newer kernels.
Quoted 8 lines
Comment by Rob in version 3:
Presumably you are getting lucky here (with link order). The kernel has no logic to decide which driver to bind to if there are 2 matching drivers. If we did, it would probably be the opposite of what you want here as we'd pick the most specific match. This driver should probably bail probe if no dwc3 child node.Please advise how to move forward with this serie.
As I tried to point out earlier, this kind of binding change is unhelpful. Yes, you now have extra code in future Linux kernels that works around the problem. But other consumers of device trees (U-Boot, other OSes) will have to add similar code or keep using older device trees. And even then it will still cause frustration for users that want to run older kernels.
I do understand that it is sometimes necessary to change device tree bindings. But changes like this one just cause a lot of pain without a significant technical benefit.
Cheers,
Mark
Quoted 59 lines
Changed V6:
rebase
remove accepted patches from serieChanged V5:
add selectChanged V4:
removed patch "of-simple: add compatible for rk3328" add patch "of-simple: bail probe if no dwc3 child node"Changed V3:
removeaclk_usb3_rksoc_axi_perf
removeaclk_usb3Changed V2:
remove node wrapperJohan Jonker (3):
usb: dwc3: of-simple: bail probe if no dwc3 child node
arm64: dts: rockchip: restyle rk3399usbdrd3_0node
arm64: dts: rockchip: restyle rk3399usbdrd3_1nodeWu Liang feng (1):
arm64: dts: rockchip: optimize clks for rk3399 dwc3arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 4 +- arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 12 +-- .../boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 6 +- arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 6 +- arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts | 12 +-- .../boot/dts/rockchip/rk3399-khadas-edge.dtsi | 12 +-- arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts | 12 +-- arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts | 2 +- arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi | 8 -- arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts | 12 +-- .../boot/dts/rockchip/rk3399-pinebook-pro.dts | 8 -- .../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 4 - arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6 +- arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 10 +-- arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 12 +-- arch/arm64/boot/dts/rockchip/rk3399-rock960.dts | 4 +- arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 8 -- arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 12 +-- arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 12 +-- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 86 ++++++++-------------- .../boot/dts/rockchip/rk3399pro-vmarc-som.dtsi | 4 - drivers/usb/dwc3/dwc3-of-simple.c | 4 + 22 files changed, 59 insertions(+), 197 deletions(-)Signature · 7 lines
2.11.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel