Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [High] arm64: dts: ti: missing cbass_main ranges for DSS1, DSI0, and DPHY on 
AM62P
--

commit c11e92d40644178d0a46e3ee6a4f0ebbf85859f3
Author: Jayesh Choudhary <[email protected]>

arm64: dts: ti: k3-am62p-j722s-common-main: Add support for DSS

This commit adds device tree nodes for DSS0, DSS1, OLDI0, OLDI1, DPHY, and
DSI to the shared k3-am62p-j722s-common-main.dtsi file along with the fixed
factor OLDI pixel clock dividers in k3-am62p.dtsi and k3-j722s.dtsi.

> diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi 
> b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
> index f130c7cb998d7..ae8db1bccadd5 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
[ ... ]
> @@ -1111,6 +1116,63 @@ dphy0: phy@30110000 {
>               status = "disabled";
>       };
>  
> +     dphy_tx0: phy@301c0000 {
> +             compatible = "ti,j721e-dphy";
> +             reg = <0x0 0x301c0000 0x0 0x1000>;
[ ... ]
> +     };
[ ... ]
> @@ -1119,6 +1181,54 @@ vpu: video-codec@30210000 {
>               power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>;
>       };
>  
> +     dss1: dss@30220000 {
> +             compatible = "ti,am62p-dss";
> +             reg = <0x00 0x30220000 0x00 0x1000>, /* common */
> +                   <0x00 0x30222000 0x00 0x1000>, /* vidl1 */
> +                   <0x00 0x30226000 0x00 0x1000>, /* vid */
> +                   <0x00 0x30227000 0x00 0x1000>, /* ovr1 */
> +                   <0x00 0x30228000 0x00 0x1000>, /* ovr2 */
> +                   <0x00 0x3022a000 0x00 0x1000>, /* vp1: Used for DPI/OLDI 
> */
> +                   <0x00 0x3022b000 0x00 0x1000>, /* vp2: Used for DPI/DSI */
> +                   <0x00 0x30221000 0x00 0x1000>; /* common1 */
[ ... ]
> +     };
> +
> +     dsi0: dsi@30500000 {
> +             compatible = "ti,j721e-dsi";
> +             reg = <0x0 0x30500000 0x0 0x100000>, <0x0 0x30270000 0x0 0x100>;

[Severity: High]
Are the cbass_main bus ranges in arch/arm64/boot/dts/ti/k3-am62p.dtsi
missing entries for dphy_tx0, dss1, and dsi0?

The nodes dphy_tx0 (0x301c0000), dss1 (0x30220000), and dsi0 (0x30500000
and 0x30270000) are added under cbass_main in
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi.

While arch/arm64/boot/dts/ti/k3-j722s.dtsi defines ranges in cbass_main
for all of these regions:

                         <0x00 0x301c0000 0x00 0x301c0000 0x00 0x00001000>, /* 
DPHY-TX */
                         <0x00 0x30101000 0x00 0x30101000 0x00 0x00080100>, /* 
CSI window */
                         <0x00 0x30200000 0x00 0x30200000 0x00 0x00010000>, /* 
DSS */
                         <0x00 0x30210000 0x00 0x30210000 0x00 0x00010000>, /* 
VPU */
                         <0x00 0x30220000 0x00 0x30220000 0x00 0x00010000>, /* 
DSS1 */
                         <0x00 0x30270000 0x00 0x30270000 0x00 0x00010000>, /* 
DSI-base1 */
                         <0x00 0x30500000 0x00 0x30500000 0x00 0x00100000>, /* 
DSI-base2 */

arch/arm64/boot/dts/ti/k3-am62p.dtsi only has the range for DSS0
(0x30200000) and VPU (0x30210000) in cbass_main:

                         <0x00 0x30040000 0x00 0x30040000 0x00 0x00080000>, /* 
PRUSS-M */
                         <0x00 0x30101000 0x00 0x30101000 0x00 0x00010100>, /* 
CSI window */
                         <0x00 0x30200000 0x00 0x30200000 0x00 0x00010000>, /* 
DSS */
                         <0x00 0x30210000 0x00 0x30210000 0x00 0x00010000>, /* 
VPU */
                         <0x00 0x31000000 0x00 0x31000000 0x00 0x00050000>, /* 
USB0 DWC3 Core window */

When dphy_tx0, dss1, or dsi0 is enabled on an AM62P board, address
translation via of_device_alloc() -> of_address_to_resource() ->
of_translate_address() -> of_translate_one() will fail to find a matching
range in cbass_main, trigger a WARN_ON(rc) in of_device_alloc(), and cause
driver probe to fail when mapping the memory resources.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=13

Reply via email to