LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] arm64: dts: rockchip: helios64: define usb hub and 2.5GbE nic
@ 2021-10-26 15:07 Dennis Gilmore
  2021-10-28 16:35 ` Florian Klink
  2021-11-21 17:50 ` Heiko Stübner
  0 siblings, 2 replies; 3+ messages in thread
From: Dennis Gilmore @ 2021-10-26 15:07 UTC (permalink / raw)
  To: linux-rockchip
  Cc: dgilmore, Rob Herring, Heiko Stuebner, Uwe Kleine-König,
	Florian Klink,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/Rockchip SoC support, open list

Add the 4 ports on the internal hub and define and turn on the 2.5GbE
nic.

Signed-off-by: Dennis Gilmore <dgilmore@redhat.com>
---
 .../dts/rockchip/rk3399-kobol-helios64.dts    | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
index 26d45cf7ce00..1ffddf860375 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
@@ -125,6 +125,18 @@ pcie_power: pcie-power {
 		vin-supply = <&vcc5v0_perdev>;
 	};
 
+	usblan_power: usblan-power {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&usb_lan_en>;
+		regulator-name = "usblan_power";
+		regulator-always-on;
+		regulator-boot-on;
+		vin-supply = <&vcc5v0_usb>;
+	};
+
 	vcc1v8_sys_s0: vcc1v8-sys-s0 {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc1v8_sys_s0";
@@ -465,6 +477,11 @@ hdd_b_power_en: hdd-b-power-en {
 		vcc5v0_usb_en: vcc5v0-usb-en {
 			rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
+
+		usb_lan_en: usb-lan-en {
+			rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
 	};
 
 	vcc3v0-sd {
@@ -563,5 +580,43 @@ &usbdrd3_1 {
 	usb@fe900000 {
 		dr_mode = "host";
 		status = "okay";
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		hub@1 {
+			compatible = "usb2109,0815";
+			reg = <1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@1 {
+				reg = <1>;
+				#trigger-source-cells = <0>;
+			};
+
+			port@2 {
+				reg = <2>;
+				#trigger-source-cells = <0>;
+			};
+
+			port@3 {
+				reg = <3>;
+				#trigger-source-cells = <0>;
+			};
+
+			device@4 {
+				compatible = "usbbda,8156";
+				reg = <4>;
+
+				#address-cells = <2>;
+				#size-cells = <0>;
+
+				interface@0 {	/* interface 0 of configuration 1 */
+					compatible = "usbbda,8156.config1.0";
+					reg = <0 1>;
+				};
+			};
+		};
 	};
 };
-- 
2.32.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: helios64: define usb hub and 2.5GbE nic
  2021-10-26 15:07 [PATCH] arm64: dts: rockchip: helios64: define usb hub and 2.5GbE nic Dennis Gilmore
@ 2021-10-28 16:35 ` Florian Klink
  2021-11-21 17:50 ` Heiko Stübner
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Klink @ 2021-10-28 16:35 UTC (permalink / raw)
  To: Dennis Gilmore
  Cc: linux-rockchip, Rob Herring, Heiko Stuebner,
	Uwe Kleine-König,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/Rockchip SoC support, open list

On 21-10-26 10:07:47, Dennis Gilmore wrote:
>Add the 4 ports on the internal hub and define and turn on the 2.5GbE
>nic.
>
>Signed-off-by: Dennis Gilmore <dgilmore@redhat.com>

Tested-by: Florian Klink <flokli@flokli.de>

>---
> .../dts/rockchip/rk3399-kobol-helios64.dts    | 55 +++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
>diff --git a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
>index 26d45cf7ce00..1ffddf860375 100644
>--- a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
>+++ b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
>@@ -125,6 +125,18 @@ pcie_power: pcie-power {
> 		vin-supply = <&vcc5v0_perdev>;
> 	};
>
>+	usblan_power: usblan-power {
>+		compatible = "regulator-fixed";
>+		enable-active-high;
>+		gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
>+		pinctrl-names = "default";
>+		pinctrl-0 = <&usb_lan_en>;
>+		regulator-name = "usblan_power";
>+		regulator-always-on;
>+		regulator-boot-on;
>+		vin-supply = <&vcc5v0_usb>;
>+	};
>+
> 	vcc1v8_sys_s0: vcc1v8-sys-s0 {
> 		compatible = "regulator-fixed";
> 		regulator-name = "vcc1v8_sys_s0";
>@@ -465,6 +477,11 @@ hdd_b_power_en: hdd-b-power-en {
> 		vcc5v0_usb_en: vcc5v0-usb-en {
> 			rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
> 		};
>+
>+		usb_lan_en: usb-lan-en {
>+			rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
>+		};
>+
> 	};
>
> 	vcc3v0-sd {
>@@ -563,5 +580,43 @@ &usbdrd3_1 {
> 	usb@fe900000 {
> 		dr_mode = "host";
> 		status = "okay";
>+
>+		#address-cells = <1>;
>+		#size-cells = <0>;
>+
>+		hub@1 {
>+			compatible = "usb2109,0815";
>+			reg = <1>;
>+			#address-cells = <1>;
>+			#size-cells = <0>;
>+
>+			port@1 {
>+				reg = <1>;
>+				#trigger-source-cells = <0>;
>+			};
>+
>+			port@2 {
>+				reg = <2>;
>+				#trigger-source-cells = <0>;
>+			};
>+
>+			port@3 {
>+				reg = <3>;
>+				#trigger-source-cells = <0>;
>+			};
>+
>+			device@4 {
>+				compatible = "usbbda,8156";
>+				reg = <4>;
>+
>+				#address-cells = <2>;
>+				#size-cells = <0>;
>+
>+				interface@0 {	/* interface 0 of configuration 1 */
>+					compatible = "usbbda,8156.config1.0";
>+					reg = <0 1>;
>+				};
>+			};
>+		};
> 	};
> };
>-- 
>2.32.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: helios64: define usb hub and 2.5GbE nic
  2021-10-26 15:07 [PATCH] arm64: dts: rockchip: helios64: define usb hub and 2.5GbE nic Dennis Gilmore
  2021-10-28 16:35 ` Florian Klink
@ 2021-11-21 17:50 ` Heiko Stübner
  1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stübner @ 2021-11-21 17:50 UTC (permalink / raw)
  To: linux-rockchip, Dennis Gilmore
  Cc: dgilmore, Rob Herring, Uwe Kleine-König, Florian Klink,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/Rockchip SoC support, open list

Hi Dennis,

Am Dienstag, 26. Oktober 2021, 17:07:47 CET schrieb Dennis Gilmore:
> Add the 4 ports on the internal hub and define and turn on the 2.5GbE
> nic.
> 
> Signed-off-by: Dennis Gilmore <dgilmore@redhat.com>
> ---
>  .../dts/rockchip/rk3399-kobol-helios64.dts    | 55 +++++++++++++++++++
>  1 file changed, 55 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
> index 26d45cf7ce00..1ffddf860375 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
> @@ -125,6 +125,18 @@ pcie_power: pcie-power {
>  		vin-supply = <&vcc5v0_perdev>;
>  	};
>  
> +	usblan_power: usblan-power {
> +		compatible = "regulator-fixed";
> +		enable-active-high;
> +		gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&usb_lan_en>;
> +		regulator-name = "usblan_power";
> +		regulator-always-on;
> +		regulator-boot-on;
> +		vin-supply = <&vcc5v0_usb>;
> +	};
> +
>  	vcc1v8_sys_s0: vcc1v8-sys-s0 {
>  		compatible = "regulator-fixed";
>  		regulator-name = "vcc1v8_sys_s0";
> @@ -465,6 +477,11 @@ hdd_b_power_en: hdd-b-power-en {
>  		vcc5v0_usb_en: vcc5v0-usb-en {
>  			rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
>  		};
> +
> +		usb_lan_en: usb-lan-en {
> +			rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +
>  	};
>  
>  	vcc3v0-sd {
> @@ -563,5 +580,43 @@ &usbdrd3_1 {
>  	usb@fe900000 {
>  		dr_mode = "host";
>  		status = "okay";
> +
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		hub@1 {
> +			compatible = "usb2109,0815";
> +			reg = <1>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@1 {

port@ nodes are not defined in the dt-bindings.

Are you really sure these are needed, as I guess only defining the
device@4 should be enough and leaving the rest to be allocated
dynamically?

The binding at least contains the line
	Usually, we only use device tree for hard wired USB device.


Heiko

> +				reg = <1>;
> +				#trigger-source-cells = <0>;
> +			};
> +
> +			port@2 {
> +				reg = <2>;
> +				#trigger-source-cells = <0>;
> +			};
> +
> +			port@3 {
> +				reg = <3>;
> +				#trigger-source-cells = <0>;
> +			};
> +
> +			device@4 {
> +				compatible = "usbbda,8156";
> +				reg = <4>;
> +
> +				#address-cells = <2>;
> +				#size-cells = <0>;
> +
> +				interface@0 {	/* interface 0 of configuration 1 */
> +					compatible = "usbbda,8156.config1.0";
> +					reg = <0 1>;
> +				};
> +			};
> +		};
>  	};
>  };
> 





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-21 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 15:07 [PATCH] arm64: dts: rockchip: helios64: define usb hub and 2.5GbE nic Dennis Gilmore
2021-10-28 16:35 ` Florian Klink
2021-11-21 17:50 ` Heiko Stübner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).