[RFC 5/5] arm64: dts: rockchip: Add USB and charger to Gameforce Ace

Krzysztof Kozlowski krzk at kernel.org
Sat Aug 31 03:39:44 PDT 2024


On 29/08/2024 23:31, Chris Morgan wrote:
> From: Chris Morgan <macromorgan at hotmail.com>
> 
> Add support for the BQ25703 charger manager and boost regulator to
> the Gameforce Ace. This also allows us to add the USB Type-C port
> manager which has a dependency on the boost regulator.
> 
> This specific patch has a dependency on the following series:
> https://lore.kernel.org/linux-rockchip/20240829204517.398669-1-macroalpha82@gmail.com/
> 
> Signed-off-by: Chris Morgan <macromorgan at hotmail.com>
> ---
>  .../dts/rockchip/rk3588s-gameforce-ace.dts    | 120 ++++++++++++++++++
>  1 file changed, 120 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts b/arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts
> index 91efb9dafc89..371f84d5ba6b 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts
> @@ -575,6 +575,56 @@ &i2c6 {
>  	pinctrl-0 = <&i2c6m3_xfer>;
>  	status = "okay";
>  
> +	fusb302: typec-portc at 22 {

typec@


> +		compatible = "fcs,fusb302";
> +		reg = <0x22>;
> +		interrupt-parent = <&gpio0>;
> +		interrupts = <RK_PC7 IRQ_TYPE_LEVEL_LOW>;
> +		pinctrl-0 = <&usbc0_int>;
> +		pinctrl-names = "default";
> +		vbus-supply = <&usb_otg_vbus>;
> +
> +		connector {
> +			compatible = "usb-c-connector";
> +			data-role = "dual";
> +			label = "USB-C";
> +			op-sink-microwatt = <1000000>;
> +			power-role = "dual";
> +			self-powered;
> +			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
> +				     PDO_FIXED(9000, 3000, PDO_FIXED_USB_COMM)
> +				     PDO_FIXED(12000, 3000, PDO_FIXED_USB_COMM)>;
> +			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
> +			try-power-role = "sink";
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port at 0 {
> +					reg = <0>;
> +					usbc0_orien_sw: endpoint {
> +						remote-endpoint = <&usbdp_phy0_orientation_switch>;
> +					};
> +				};
> +
> +				port at 1 {
> +					reg = <1>;
> +					usbc0_role_sw: endpoint {
> +						remote-endpoint = <&dwc3_0_role_switch>;
> +					};
> +				};
> +
> +				port at 2 {
> +					reg = <2>;
> +					dp_altmode_mux: endpoint {
> +						remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
> +					};
> +				};
> +			};
> +		};
> +	};
> +
>  	rtc_hym8563: rtc at 51 {
>  		compatible = "haoyu,hym8563";
>  		reg = <0x51>;
> @@ -603,8 +653,40 @@ cw2015 at 62 {
>  			 0x2F 0x00 0x64 0xA5 0xB5 0x1C 0xF0 0x49>;
>  		cellwise,monitor-interval-ms = <5000>;
>  		monitored-battery = <&battery>;
> +		power-supplies = <&bq25703>;
>  		status = "okay";
>  	};
> +
> +	bq25703: bq25703 at 6b {

Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

e.g. charger@

> +		compatible = "ti,bq25703a";
> +		reg = <0x6b>;
> +		interrupt-parent = <&gpio0>;
> +		interrupts = <RK_PD5 IRQ_TYPE_LEVEL_LOW>;
> +		pinctrl-0 = <&charger_int_h>;
> +		pinctrl-names = "default";
> +		power-supplies = <&fusb302>;



Best regards,
Krzysztof




More information about the Linux-rockchip mailing list