# \[PATCH v1 1/1\] arm64: dts: stingray: fix usb dma address translation

- Subsystems: BROADCOM IPROC ARM ARCHITECTURE, THE REST
- Maintainers: Ray Jui, Scott Branden, Linus Torvalds
- List: linux-arm-kernel
- 4 messages, 4 authors
- Page: https://ratatoskr.run/linux-arm-kernel/2021/01/6239510/t

## \[PATCH v1 1/1\] arm64: dts: stingray: fix usb dma address translation

- From: Rayagonda Kokatanur \<hidden\>
- Date: 2021-01-19 06:50:50 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/01/6239510.md

```text
From: Bharat Gooty <redacted>

Add a non-empty dma-ranges so that dma address translation
happens.

Fixes: 2013a4b684b6 ("arm64: dts: broadcom: clear the warnings caused by empty dma-ranges")

Signed-off-by: Bharat Gooty <redacted>
Signed-off-by: Rayagonda Kokatanur <redacted>
---
 arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi b/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi
index aef8f2b00778..5401a646c840 100644
--- a/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi
+++ b/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi
@@ -4,11 +4,16 @@
  */
 	usb {
 		compatible = "simple-bus";
-		dma-ranges;
 		#address-cells = <2>;
 		#size-cells = <2>;
 		ranges = <0x0 0x0 0x0 0x68500000 0x0 0x00400000>;
 
+		/*
+		 * Internally, USB bus to the interconnect can only address up
+		 * to 40-bit
+		 */
+		dma-ranges = <0 0 0 0 0x100 0x0>;
+
 		usbphy0: usb-phy@0 {
 			compatible = "brcm,sr-usb-combo-phy";
 			reg = <0x0 0x00000000 0x0 0x100>;
-- 
2.17.1

```

## Re: \[PATCH v1 1/1\] arm64: dts: stingray: fix usb dma address translation

- From: Arnd Bergmann \<arnd@kernel.org\>
- Date: 2021-01-19 08:47:08 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/01/6239611.md

```text
On Tue, Jan 19, 2021 at 6:34 AM Rayagonda Kokatanur
[ref] wrote:
>
> From: Bharat Gooty <redacted>
>
> Add a non-empty dma-ranges so that dma address translation
> happens.
>
> Fixes: 2013a4b684b6 ("arm64: dts: broadcom: clear the warnings caused by empty dma-ranges")
>
> Signed-off-by: Bharat Gooty <redacted>
> Signed-off-by: Rayagonda Kokatanur <redacted>

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```

## Re: \[PATCH v1 1/1\] arm64: dts: stingray: fix usb dma address translation

- From: Ray Jui \<ray.jui@broadcom.com\>
- Date: 2021-01-19 22:30:12 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/01/6240410.md

```text


On 1/18/2021 9:34 PM, Rayagonda Kokatanur wrote:
> From: Bharat Gooty <redacted>
> 
> Add a non-empty dma-ranges so that dma address translation
> happens.
> 
> Fixes: 2013a4b684b6 ("arm64: dts: broadcom: clear the warnings caused by empty dma-ranges")
> 
> Signed-off-by: Bharat Gooty <redacted>
> Signed-off-by: Rayagonda Kokatanur <redacted>
> ---
>  arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi b/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi
> index aef8f2b00778..5401a646c840 100644
> --- a/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi
> +++ b/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi
> @@ -4,11 +4,16 @@
>   */
>  	usb {
>  		compatible = "simple-bus";
> -		dma-ranges;
>  		#address-cells = <2>;
>  		#size-cells = <2>;
>  		ranges = <0x0 0x0 0x0 0x68500000 0x0 0x00400000>;
>  
> +		/*
> +		 * Internally, USB bus to the interconnect can only address up
> +		 * to 40-bit
> +		 */
> +		dma-ranges = <0 0 0 0 0x100 0x0>;
> +

Should have had my signed-off since during our internal review, I added
the above comment to explain why we set it to 40-bit here despite the
USB controller itself is capable of addressing 64-bit as Arnd pointed out.

Well, the following ack should do it too, thanks.

Acked-by: Ray Jui <ray.jui@broadcom.com>

>  		usbphy0: usb-phy@0 {
>  			compatible = "brcm,sr-usb-combo-phy";
>  			reg = <0x0 0x00000000 0x0 0x100>;
> 
```

## Re: \[PATCH v1 1/1\] arm64: dts: stingray: fix usb dma address translation

- From: Florian Fainelli \<f.fainelli@gmail.com\>
- Date: 2021-01-20 19:23:13 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/01/6241713.md

```text
On Tue, 19 Jan 2021 11:04:44 +0530, Rayagonda Kokatanur [ref] wrote:
> From: Bharat Gooty <redacted>
> 
> Add a non-empty dma-ranges so that dma address translation
> happens.
> 
> Fixes: 2013a4b684b6 ("arm64: dts: broadcom: clear the warnings caused by empty dma-ranges")
> 
> Signed-off-by: Bharat Gooty <redacted>
> Signed-off-by: Rayagonda Kokatanur <redacted>
> ---

Applied to devicetree-arm64/fixes, thanks!
--
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
