Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phys with subnodes and #phy-cells requirement #22

Closed
mmind opened this issue Aug 28, 2019 · 1 comment · Fixed by #92
Closed

phys with subnodes and #phy-cells requirement #22

mmind opened this issue Aug 28, 2019 · 1 comment · Fixed by #92

Comments

@mmind
Copy link

mmind commented Aug 28, 2019

the phy-provider pattern matches against ...phy@... but for example
on some Rockchip socs the actual phy node might be in a subnode of it,
like when the phy is composed of multiple phys.
Which then triggers an error about #phy-cells being missing.

For example in arch/arm64/boot/dts/rockchip/rk3399.dtsi:

  u2phy0: usb2-phy@e450 {
  	compatible = "rockchip,rk3399-usb2phy";
  	reg = <0xe450 0x10>;
  	clocks = <&cru SCLK_USB2PHY0_REF>;
  	clock-names = "phyclk";
  	#clock-cells = <0>;
  	clock-output-names = "clk_usbphy0_480m";
  	status = "disabled";

  	u2phy0_host: host-port {
  		#phy-cells = <0>;
  		interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>;
  		interrupt-names = "linestate";
  		status = "disabled";
  	};

  	u2phy0_otg: otg-port {
  		#phy-cells = <0>;
  		interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>,
  			     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>,
  			     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>;
  		interrupt-names = "otg-bvalid", "otg-id",
  				  "linestate";
  		status = "disabled";
  	};
  };

Not sure how to solve this though

@robherring
Copy link
Member

Ideally only phy providers are named 'phy' and the parent something else (not sure what to suggest). I'd probably rename the child nodes to phy@e454 and phy@e458 as those happen to be the unique register for each phy. Of course, that wouldn't work if all the registers were interleaved. The other option would have been get rid of the child nodes and just combine the interrupts to a single property in the parent node (with #phy-cells == 1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants