diff mbox series

ARM: dts: Add am335x mcasp with l3 data port ranges

Message ID 20181205230356.38855-1-tony@atomide.com (mailing list archive)
State New, archived
Headers show
Series ARM: dts: Add am335x mcasp with l3 data port ranges | expand

Commit Message

Tony Lindgren Dec. 5, 2018, 11:03 p.m. UTC
Earlier attempt to move am335x mcasp to probe with ti-sysc
interconnect target module caused audio to stop working and and
the dts changes were reverted by commit 5d2632a577ba ("ARM: dts:
Revert am335x mcasp ti-sysc changes").

Turns out we were missing the l3 data port ranges for mcasp. This
caused mcasp dma to attempt to use wrong port address. So let's
try again essentially reverting the earlier revert and adding the
missing l3 data port ranges.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---

Peter, can you please test with your bbb + audio cape?

---
 arch/arm/boot/dts/am33xx-l4.dtsi | 42 +++++++++++++++++++++++++++-----
 arch/arm/boot/dts/am33xx.dtsi    | 29 ----------------------
 2 files changed, 36 insertions(+), 35 deletions(-)

Comments

Peter Ujfalusi Dec. 10, 2018, 7:05 a.m. UTC | #1
Tony,

On 06/12/2018 1.03, Tony Lindgren wrote:
> Earlier attempt to move am335x mcasp to probe with ti-sysc
> interconnect target module caused audio to stop working and and
> the dts changes were reverted by commit 5d2632a577ba ("ARM: dts:
> Revert am335x mcasp ti-sysc changes").
> 
> Turns out we were missing the l3 data port ranges for mcasp. This
> caused mcasp dma to attempt to use wrong port address. So let's
> try again essentially reverting the earlier revert and adding the
> missing l3 data port ranges.
> 
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> 
> Peter, can you please test with your bbb + audio cape?

Works fine on bbb + audio cape.
For some reason my am335x-evm-sk is not booting up at all w/ linux-next,
but I believe it is not related to this (disabled audio and still not
booting).

Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> 
> ---
>  arch/arm/boot/dts/am33xx-l4.dtsi | 42 +++++++++++++++++++++++++++-----
>  arch/arm/boot/dts/am33xx.dtsi    | 29 ----------------------
>  2 files changed, 36 insertions(+), 35 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
> --- a/arch/arm/boot/dts/am33xx-l4.dtsi
> +++ b/arch/arm/boot/dts/am33xx-l4.dtsi
> @@ -824,7 +824,9 @@
>  	ranges = <0x00000000 0x48000000 0x100000>,	/* segment 0 */
>  		 <0x00100000 0x48100000 0x100000>,	/* segment 1 */
>  		 <0x00200000 0x48200000 0x100000>,	/* segment 2 */
> -		 <0x00300000 0x48300000 0x100000>;	/* segment 3 */
> +		 <0x00300000 0x48300000 0x100000>,	/* segment 3 */
> +		 <0x46000000 0x46000000 0x400000>,	/* l3 data port */
> +		 <0x46400000 0x46400000 0x400000>;	/* l3 data port */
>  
>  	segment@0 {					/* 0x48000000 */
>  		compatible = "simple-bus";
> @@ -881,7 +883,9 @@
>  			 <0x000cc000 0x000cc000 0x001000>,	/* ap 89 */
>  			 <0x000cd000 0x000cd000 0x001000>,	/* ap 90 */
>  			 <0x000ca000 0x000ca000 0x001000>,	/* ap 91 */
> -			 <0x000cb000 0x000cb000 0x001000>;	/* ap 92 */
> +			 <0x000cb000 0x000cb000 0x001000>,	/* ap 92 */
> +			 <0x46000000 0x46000000 0x400000>,	/* l3 data port */
> +			 <0x46400000 0x46400000 0x400000>;	/* l3 data port */
>  
>  		target-module@8000 {			/* 0x48008000, ap 6 10.0 */
>  			compatible = "ti,sysc";
> @@ -1055,8 +1059,21 @@
>  			clock-names = "fck";
>  			#address-cells = <1>;
>  			#size-cells = <1>;
> -			ranges = <0x0 0x38000 0x2000>;
> -			status = "disabled";
> +			ranges = <0x0 0x38000 0x2000>,
> +				 <0x46000000 0x46000000 0x400000>;
> +
> +			mcasp0: mcasp@0 {
> +				compatible = "ti,am33xx-mcasp-audio";
> +				reg = <0x0 0x2000>,
> +				      <0x46000000 0x400000>;
> +				reg-names = "mpu", "dat";
> +				interrupts = <80>, <81>;
> +				interrupt-names = "tx", "rx";
> +				status = "disabled";
> +				dmas = <&edma 8 2>,
> +					<&edma 9 2>;
> +				dma-names = "tx", "rx";
> +			};
>  		};
>  
>  		target-module@3c000 {			/* 0x4803c000, ap 20 32.0 */
> @@ -1073,8 +1090,21 @@
>  			clock-names = "fck";
>  			#address-cells = <1>;
>  			#size-cells = <1>;
> -			ranges = <0x0 0x3c000 0x2000>;
> -			status = "disabled";
> +			ranges = <0x0 0x3c000 0x2000>,
> +				 <0x46400000 0x46400000 0x400000>;
> +
> +			mcasp1: mcasp@0 {
> +				compatible = "ti,am33xx-mcasp-audio";
> +				reg = <0x0 0x2000>,
> +				      <0x46400000 0x400000>;
> +				reg-names = "mpu", "dat";
> +				interrupts = <82>, <83>;
> +				interrupt-names = "tx", "rx";
> +				status = "disabled";
> +				dmas = <&edma 10 2>,
> +					<&edma 11 2>;
> +				dma-names = "tx", "rx";
> +			};
>  		};
>  
>  		target-module@40000 {			/* 0x48040000, ap 22 1e.0 */
> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
> --- a/arch/arm/boot/dts/am33xx.dtsi
> +++ b/arch/arm/boot/dts/am33xx.dtsi
> @@ -440,36 +440,7 @@
>  			       <&edma 5 0>;
>  			dma-names = "tx", "rx";
>  		};
> -
> -		mcasp0: mcasp@48038000 {
> -			compatible = "ti,am33xx-mcasp-audio";
> -			ti,hwmods = "mcasp0";
> -			reg = <0x48038000 0x2000>,
> -			      <0x46000000 0x400000>;
> -			reg-names = "mpu", "dat";
> -			interrupts = <80>, <81>;
> -			interrupt-names = "tx", "rx";
> -			status = "disabled";
> -			dmas = <&edma 8 2>,
> -				<&edma 9 2>;
> -			dma-names = "tx", "rx";
> -		};
> -
> -		mcasp1: mcasp@4803c000 {
> -			compatible = "ti,am33xx-mcasp-audio";
> -			ti,hwmods = "mcasp1";
> -			reg = <0x4803C000 0x2000>,
> -			      <0x46400000 0x400000>;
> -			reg-names = "mpu", "dat";
> -			interrupts = <82>, <83>;
> -			interrupt-names = "tx", "rx";
> -			status = "disabled";
> -			dmas = <&edma 10 2>,
> -				<&edma 11 2>;
> -			dma-names = "tx", "rx";
> -		};
>  	};
> -
>  };
>  
>  #include "am33xx-l4.dtsi"
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Peter Ujfalusi Dec. 10, 2018, 9:53 a.m. UTC | #2
On 10/12/2018 9.05, Peter Ujfalusi wrote:
> Tony,
> 
> On 06/12/2018 1.03, Tony Lindgren wrote:
>> Earlier attempt to move am335x mcasp to probe with ti-sysc
>> interconnect target module caused audio to stop working and and
>> the dts changes were reverted by commit 5d2632a577ba ("ARM: dts:
>> Revert am335x mcasp ti-sysc changes").
>>
>> Turns out we were missing the l3 data port ranges for mcasp. This
>> caused mcasp dma to attempt to use wrong port address. So let's
>> try again essentially reverting the earlier revert and adding the
>> missing l3 data port ranges.
>>
>> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> Signed-off-by: Tony Lindgren <tony@atomide.com>
>> ---
>>
>> Peter, can you please test with your bbb + audio cape?
> 
> Works fine on bbb + audio cape.
> For some reason my am335x-evm-sk is not booting up at all w/ linux-next,
> but I believe it is not related to this (disabled audio and still not
> booting).

bisect on next-20181207 (am335x-evm-sk) points to:
Author: Tony Lindgren <tony@atomide.com>
87fc89ced3a78f7f0845afab1934d509ef4ad0f2
ARM: dts: am335x: Move l4 child devices to probe them with ti-sysc

when looking for the non booting of am335x-evm-sk (nothing printed on
serial after stating kernel).

However there is another issue: the kernel boots, but ethernet is not
working in the kernel. That is pointing to:
Author: Tero Kristo <t-kristo@ti.com>
69fd70c7ff31d3f00833c472c3994a02bb0ab287
ARM: dts: am33xx: convert to use new clkctrl layout

any idea what might causes these?

> 
> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> 
>>
>> ---
>>  arch/arm/boot/dts/am33xx-l4.dtsi | 42 +++++++++++++++++++++++++++-----
>>  arch/arm/boot/dts/am33xx.dtsi    | 29 ----------------------
>>  2 files changed, 36 insertions(+), 35 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
>> --- a/arch/arm/boot/dts/am33xx-l4.dtsi
>> +++ b/arch/arm/boot/dts/am33xx-l4.dtsi
>> @@ -824,7 +824,9 @@
>>  	ranges = <0x00000000 0x48000000 0x100000>,	/* segment 0 */
>>  		 <0x00100000 0x48100000 0x100000>,	/* segment 1 */
>>  		 <0x00200000 0x48200000 0x100000>,	/* segment 2 */
>> -		 <0x00300000 0x48300000 0x100000>;	/* segment 3 */
>> +		 <0x00300000 0x48300000 0x100000>,	/* segment 3 */
>> +		 <0x46000000 0x46000000 0x400000>,	/* l3 data port */
>> +		 <0x46400000 0x46400000 0x400000>;	/* l3 data port */
>>  
>>  	segment@0 {					/* 0x48000000 */
>>  		compatible = "simple-bus";
>> @@ -881,7 +883,9 @@
>>  			 <0x000cc000 0x000cc000 0x001000>,	/* ap 89 */
>>  			 <0x000cd000 0x000cd000 0x001000>,	/* ap 90 */
>>  			 <0x000ca000 0x000ca000 0x001000>,	/* ap 91 */
>> -			 <0x000cb000 0x000cb000 0x001000>;	/* ap 92 */
>> +			 <0x000cb000 0x000cb000 0x001000>,	/* ap 92 */
>> +			 <0x46000000 0x46000000 0x400000>,	/* l3 data port */
>> +			 <0x46400000 0x46400000 0x400000>;	/* l3 data port */
>>  
>>  		target-module@8000 {			/* 0x48008000, ap 6 10.0 */
>>  			compatible = "ti,sysc";
>> @@ -1055,8 +1059,21 @@
>>  			clock-names = "fck";
>>  			#address-cells = <1>;
>>  			#size-cells = <1>;
>> -			ranges = <0x0 0x38000 0x2000>;
>> -			status = "disabled";
>> +			ranges = <0x0 0x38000 0x2000>,
>> +				 <0x46000000 0x46000000 0x400000>;
>> +
>> +			mcasp0: mcasp@0 {
>> +				compatible = "ti,am33xx-mcasp-audio";
>> +				reg = <0x0 0x2000>,
>> +				      <0x46000000 0x400000>;
>> +				reg-names = "mpu", "dat";
>> +				interrupts = <80>, <81>;
>> +				interrupt-names = "tx", "rx";
>> +				status = "disabled";
>> +				dmas = <&edma 8 2>,
>> +					<&edma 9 2>;
>> +				dma-names = "tx", "rx";
>> +			};
>>  		};
>>  
>>  		target-module@3c000 {			/* 0x4803c000, ap 20 32.0 */
>> @@ -1073,8 +1090,21 @@
>>  			clock-names = "fck";
>>  			#address-cells = <1>;
>>  			#size-cells = <1>;
>> -			ranges = <0x0 0x3c000 0x2000>;
>> -			status = "disabled";
>> +			ranges = <0x0 0x3c000 0x2000>,
>> +				 <0x46400000 0x46400000 0x400000>;
>> +
>> +			mcasp1: mcasp@0 {
>> +				compatible = "ti,am33xx-mcasp-audio";
>> +				reg = <0x0 0x2000>,
>> +				      <0x46400000 0x400000>;
>> +				reg-names = "mpu", "dat";
>> +				interrupts = <82>, <83>;
>> +				interrupt-names = "tx", "rx";
>> +				status = "disabled";
>> +				dmas = <&edma 10 2>,
>> +					<&edma 11 2>;
>> +				dma-names = "tx", "rx";
>> +			};
>>  		};
>>  
>>  		target-module@40000 {			/* 0x48040000, ap 22 1e.0 */
>> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
>> --- a/arch/arm/boot/dts/am33xx.dtsi
>> +++ b/arch/arm/boot/dts/am33xx.dtsi
>> @@ -440,36 +440,7 @@
>>  			       <&edma 5 0>;
>>  			dma-names = "tx", "rx";
>>  		};
>> -
>> -		mcasp0: mcasp@48038000 {
>> -			compatible = "ti,am33xx-mcasp-audio";
>> -			ti,hwmods = "mcasp0";
>> -			reg = <0x48038000 0x2000>,
>> -			      <0x46000000 0x400000>;
>> -			reg-names = "mpu", "dat";
>> -			interrupts = <80>, <81>;
>> -			interrupt-names = "tx", "rx";
>> -			status = "disabled";
>> -			dmas = <&edma 8 2>,
>> -				<&edma 9 2>;
>> -			dma-names = "tx", "rx";
>> -		};
>> -
>> -		mcasp1: mcasp@4803c000 {
>> -			compatible = "ti,am33xx-mcasp-audio";
>> -			ti,hwmods = "mcasp1";
>> -			reg = <0x4803C000 0x2000>,
>> -			      <0x46400000 0x400000>;
>> -			reg-names = "mpu", "dat";
>> -			interrupts = <82>, <83>;
>> -			interrupt-names = "tx", "rx";
>> -			status = "disabled";
>> -			dmas = <&edma 10 2>,
>> -				<&edma 11 2>;
>> -			dma-names = "tx", "rx";
>> -		};
>>  	};
>> -
>>  };
>>  
>>  #include "am33xx-l4.dtsi"
>>
> 
> - Péter
> 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Peter Ujfalusi Dec. 10, 2018, 1:46 p.m. UTC | #3
On 10/12/2018 11.53, Peter Ujfalusi wrote:
> 
> 
> On 10/12/2018 9.05, Peter Ujfalusi wrote:
>> Tony,
>>
>> On 06/12/2018 1.03, Tony Lindgren wrote:
>>> Earlier attempt to move am335x mcasp to probe with ti-sysc
>>> interconnect target module caused audio to stop working and and
>>> the dts changes were reverted by commit 5d2632a577ba ("ARM: dts:
>>> Revert am335x mcasp ti-sysc changes").
>>>
>>> Turns out we were missing the l3 data port ranges for mcasp. This
>>> caused mcasp dma to attempt to use wrong port address. So let's
>>> try again essentially reverting the earlier revert and adding the
>>> missing l3 data port ranges.
>>>
>>> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
>>> Signed-off-by: Tony Lindgren <tony@atomide.com>
>>> ---
>>>
>>> Peter, can you please test with your bbb + audio cape?
>>
>> Works fine on bbb + audio cape.
>> For some reason my am335x-evm-sk is not booting up at all w/ linux-next,
>> but I believe it is not related to this (disabled audio and still not
>> booting).
> 
> bisect on next-20181207 (am335x-evm-sk) points to:
> Author: Tony Lindgren <tony@atomide.com>
> 87fc89ced3a78f7f0845afab1934d509ef4ad0f2
> ARM: dts: am335x: Move l4 child devices to probe them with ti-sysc
> 
> when looking for the non booting of am335x-evm-sk (nothing printed on
> serial after stating kernel).
> 
> However there is another issue: the kernel boots, but ethernet is not
> working in the kernel. That is pointing to:
> Author: Tero Kristo <t-kristo@ti.com>
> 69fd70c7ff31d3f00833c472c3994a02bb0ab287
> ARM: dts: am33xx: convert to use new clkctrl layout
> 
> any idea what might causes these?

Things definitely go wrong at 69fd70c7ff31d3f00833c472c3994a02bb0ab287:

git checkout -b blah 69fd70c7ff31d3f00833c472c3994a02bb0ab287
# can not mount the rootfs via nfs

git revert 69fd70c7ff31d3f00833c472c3994a02bb0ab287
# boots up via nfs rootfs.

At commit 69fd70c7ff31d3f00833c472c3994a02bb0ab287 the bbb is not
booting via nfs rootfs either.

Can not find where the ethernet started to work after these on bbb, but
it does work on top of next-20181207.

> 
>>
>> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>>
>>>
>>> ---
>>>  arch/arm/boot/dts/am33xx-l4.dtsi | 42 +++++++++++++++++++++++++++-----
>>>  arch/arm/boot/dts/am33xx.dtsi    | 29 ----------------------
>>>  2 files changed, 36 insertions(+), 35 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
>>> --- a/arch/arm/boot/dts/am33xx-l4.dtsi
>>> +++ b/arch/arm/boot/dts/am33xx-l4.dtsi
>>> @@ -824,7 +824,9 @@
>>>  	ranges = <0x00000000 0x48000000 0x100000>,	/* segment 0 */
>>>  		 <0x00100000 0x48100000 0x100000>,	/* segment 1 */
>>>  		 <0x00200000 0x48200000 0x100000>,	/* segment 2 */
>>> -		 <0x00300000 0x48300000 0x100000>;	/* segment 3 */
>>> +		 <0x00300000 0x48300000 0x100000>,	/* segment 3 */
>>> +		 <0x46000000 0x46000000 0x400000>,	/* l3 data port */
>>> +		 <0x46400000 0x46400000 0x400000>;	/* l3 data port */
>>>  
>>>  	segment@0 {					/* 0x48000000 */
>>>  		compatible = "simple-bus";
>>> @@ -881,7 +883,9 @@
>>>  			 <0x000cc000 0x000cc000 0x001000>,	/* ap 89 */
>>>  			 <0x000cd000 0x000cd000 0x001000>,	/* ap 90 */
>>>  			 <0x000ca000 0x000ca000 0x001000>,	/* ap 91 */
>>> -			 <0x000cb000 0x000cb000 0x001000>;	/* ap 92 */
>>> +			 <0x000cb000 0x000cb000 0x001000>,	/* ap 92 */
>>> +			 <0x46000000 0x46000000 0x400000>,	/* l3 data port */
>>> +			 <0x46400000 0x46400000 0x400000>;	/* l3 data port */
>>>  
>>>  		target-module@8000 {			/* 0x48008000, ap 6 10.0 */
>>>  			compatible = "ti,sysc";
>>> @@ -1055,8 +1059,21 @@
>>>  			clock-names = "fck";
>>>  			#address-cells = <1>;
>>>  			#size-cells = <1>;
>>> -			ranges = <0x0 0x38000 0x2000>;
>>> -			status = "disabled";
>>> +			ranges = <0x0 0x38000 0x2000>,
>>> +				 <0x46000000 0x46000000 0x400000>;
>>> +
>>> +			mcasp0: mcasp@0 {
>>> +				compatible = "ti,am33xx-mcasp-audio";
>>> +				reg = <0x0 0x2000>,
>>> +				      <0x46000000 0x400000>;
>>> +				reg-names = "mpu", "dat";
>>> +				interrupts = <80>, <81>;
>>> +				interrupt-names = "tx", "rx";
>>> +				status = "disabled";
>>> +				dmas = <&edma 8 2>,
>>> +					<&edma 9 2>;
>>> +				dma-names = "tx", "rx";
>>> +			};
>>>  		};
>>>  
>>>  		target-module@3c000 {			/* 0x4803c000, ap 20 32.0 */
>>> @@ -1073,8 +1090,21 @@
>>>  			clock-names = "fck";
>>>  			#address-cells = <1>;
>>>  			#size-cells = <1>;
>>> -			ranges = <0x0 0x3c000 0x2000>;
>>> -			status = "disabled";
>>> +			ranges = <0x0 0x3c000 0x2000>,
>>> +				 <0x46400000 0x46400000 0x400000>;
>>> +
>>> +			mcasp1: mcasp@0 {
>>> +				compatible = "ti,am33xx-mcasp-audio";
>>> +				reg = <0x0 0x2000>,
>>> +				      <0x46400000 0x400000>;
>>> +				reg-names = "mpu", "dat";
>>> +				interrupts = <82>, <83>;
>>> +				interrupt-names = "tx", "rx";
>>> +				status = "disabled";
>>> +				dmas = <&edma 10 2>,
>>> +					<&edma 11 2>;
>>> +				dma-names = "tx", "rx";
>>> +			};
>>>  		};
>>>  
>>>  		target-module@40000 {			/* 0x48040000, ap 22 1e.0 */
>>> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
>>> --- a/arch/arm/boot/dts/am33xx.dtsi
>>> +++ b/arch/arm/boot/dts/am33xx.dtsi
>>> @@ -440,36 +440,7 @@
>>>  			       <&edma 5 0>;
>>>  			dma-names = "tx", "rx";
>>>  		};
>>> -
>>> -		mcasp0: mcasp@48038000 {
>>> -			compatible = "ti,am33xx-mcasp-audio";
>>> -			ti,hwmods = "mcasp0";
>>> -			reg = <0x48038000 0x2000>,
>>> -			      <0x46000000 0x400000>;
>>> -			reg-names = "mpu", "dat";
>>> -			interrupts = <80>, <81>;
>>> -			interrupt-names = "tx", "rx";
>>> -			status = "disabled";
>>> -			dmas = <&edma 8 2>,
>>> -				<&edma 9 2>;
>>> -			dma-names = "tx", "rx";
>>> -		};
>>> -
>>> -		mcasp1: mcasp@4803c000 {
>>> -			compatible = "ti,am33xx-mcasp-audio";
>>> -			ti,hwmods = "mcasp1";
>>> -			reg = <0x4803C000 0x2000>,
>>> -			      <0x46400000 0x400000>;
>>> -			reg-names = "mpu", "dat";
>>> -			interrupts = <82>, <83>;
>>> -			interrupt-names = "tx", "rx";
>>> -			status = "disabled";
>>> -			dmas = <&edma 10 2>,
>>> -				<&edma 11 2>;
>>> -			dma-names = "tx", "rx";
>>> -		};
>>>  	};
>>> -
>>>  };
>>>  
>>>  #include "am33xx-l4.dtsi"
>>>
>>
>> - Péter
>>
>> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
>> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>>
> 
> - Péter
> 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Tony Lindgren Dec. 10, 2018, 2:48 p.m. UTC | #4
* Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 09:52]:
> On 10/12/2018 9.05, Peter Ujfalusi wrote:
> > Works fine on bbb + audio cape.
> > For some reason my am335x-evm-sk is not booting up at all w/ linux-next,
> > but I believe it is not related to this (disabled audio and still not
> > booting).
> 
> bisect on next-20181207 (am335x-evm-sk) points to:
> Author: Tony Lindgren <tony@atomide.com>
> 87fc89ced3a78f7f0845afab1934d509ef4ad0f2
> ARM: dts: am335x: Move l4 child devices to probe them with ti-sysc
> 
> when looking for the non booting of am335x-evm-sk (nothing printed on
> serial after stating kernel).

OK I'm pretty sure this is because we now need to move the gpio1
ti,no-reset-on-init up to the module level because of the DDR being
GPIO controlled. I'll send a patch out shortly for that.

It might be also worth adding a check for having ti,no-reset-on-init
at the child level to ti-sysc driver too.

Regards,

Tony
Tony Lindgren Dec. 10, 2018, 2:50 p.m. UTC | #5
* Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 13:45]:
> On 10/12/2018 11.53, Peter Ujfalusi wrote:
> > On 10/12/2018 9.05, Peter Ujfalusi wrote:
> > when looking for the non booting of am335x-evm-sk (nothing printed on
> > serial after stating kernel).
> > 
> > However there is another issue: the kernel boots, but ethernet is not
> > working in the kernel. That is pointing to:
> > Author: Tero Kristo <t-kristo@ti.com>
> > 69fd70c7ff31d3f00833c472c3994a02bb0ab287
> > ARM: dts: am33xx: convert to use new clkctrl layout
> > 
> > any idea what might causes these?
> 
> Things definitely go wrong at 69fd70c7ff31d3f00833c472c3994a02bb0ab287:
> 
> git checkout -b blah 69fd70c7ff31d3f00833c472c3994a02bb0ab287
> # can not mount the rootfs via nfs
> 
> git revert 69fd70c7ff31d3f00833c472c3994a02bb0ab287
> # boots up via nfs rootfs.
> 
> At commit 69fd70c7ff31d3f00833c472c3994a02bb0ab287 the bbb is not
> booting via nfs rootfs either.
> 
> Can not find where the ethernet started to work after these on bbb, but
> it does work on top of next-20181207.

Tero do you have any ideas on this one? Maybe a missing optional clock
somewhere?

Regards,

Tony
Tero Kristo Dec. 10, 2018, 3:12 p.m. UTC | #6
On 10/12/2018 16:50, Tony Lindgren wrote:
> * Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 13:45]:
>> On 10/12/2018 11.53, Peter Ujfalusi wrote:
>>> On 10/12/2018 9.05, Peter Ujfalusi wrote:
>>> when looking for the non booting of am335x-evm-sk (nothing printed on
>>> serial after stating kernel).
>>>
>>> However there is another issue: the kernel boots, but ethernet is not
>>> working in the kernel. That is pointing to:
>>> Author: Tero Kristo <t-kristo@ti.com>
>>> 69fd70c7ff31d3f00833c472c3994a02bb0ab287
>>> ARM: dts: am33xx: convert to use new clkctrl layout
>>>
>>> any idea what might causes these?
>>
>> Things definitely go wrong at 69fd70c7ff31d3f00833c472c3994a02bb0ab287:
>>
>> git checkout -b blah 69fd70c7ff31d3f00833c472c3994a02bb0ab287
>> # can not mount the rootfs via nfs
>>
>> git revert 69fd70c7ff31d3f00833c472c3994a02bb0ab287
>> # boots up via nfs rootfs.
>>
>> At commit 69fd70c7ff31d3f00833c472c3994a02bb0ab287 the bbb is not
>> booting via nfs rootfs either.
>>
>> Can not find where the ethernet started to work after these on bbb, but
>> it does work on top of next-20181207.
> 
> Tero do you have any ideas on this one? Maybe a missing optional clock
> somewhere?

No initial ideas, do we have any error logs for this?

Did you bisect the issue to 69fd70c7ff31d3? It is possible this is 
actually caused by something else, as there are some interesting 
dependencies between the patches that are being queued at the same point 
to the kernel now.

-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Peter Ujfalusi Dec. 10, 2018, 3:28 p.m. UTC | #7
On 10/12/2018 17.12, Tero Kristo wrote:
> On 10/12/2018 16:50, Tony Lindgren wrote:
>> * Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 13:45]:
>>> On 10/12/2018 11.53, Peter Ujfalusi wrote:
>>>> On 10/12/2018 9.05, Peter Ujfalusi wrote:
>>>> when looking for the non booting of am335x-evm-sk (nothing printed on
>>>> serial after stating kernel).
>>>>
>>>> However there is another issue: the kernel boots, but ethernet is not
>>>> working in the kernel. That is pointing to:
>>>> Author: Tero Kristo <t-kristo@ti.com>
>>>> 69fd70c7ff31d3f00833c472c3994a02bb0ab287
>>>> ARM: dts: am33xx: convert to use new clkctrl layout
>>>>
>>>> any idea what might causes these?
>>>
>>> Things definitely go wrong at 69fd70c7ff31d3f00833c472c3994a02bb0ab287:
>>>
>>> git checkout -b blah 69fd70c7ff31d3f00833c472c3994a02bb0ab287
>>> # can not mount the rootfs via nfs
>>>
>>> git revert 69fd70c7ff31d3f00833c472c3994a02bb0ab287
>>> # boots up via nfs rootfs.
>>>
>>> At commit 69fd70c7ff31d3f00833c472c3994a02bb0ab287 the bbb is not
>>> booting via nfs rootfs either.
>>>
>>> Can not find where the ethernet started to work after these on bbb, but
>>> it does work on top of next-20181207.
>>
>> Tero do you have any ideas on this one? Maybe a missing optional clock
>> somewhere?
> 
> No initial ideas, do we have any error logs for this?
> 
> Did you bisect the issue to 69fd70c7ff31d3?

Yep, I did.

> It is possible this is
> actually caused by something else, as there are some interesting
> dependencies between the patches that are being queued at the same point
> to the kernel now.

Could be, but:
git checkout -b blah 69fd70c7ff31d3f00833c472c3994a02bb0ab287
# can not mount the rootfs via nfs
git revert 69fd70c7ff31d3f00833c472c3994a02bb0ab287
# boots up via nfs rootfs.

When my HEAD is 69fd70c7ff31d3 and I revert only the topmost commit
(69fd70c7ff31d3), the board boots.

It could be that the ethernet not working is just a side effect of
something else going wrong, but this is the indication I have.

Nothing special in the logs, I can share the two bootlogs:
1. HEAD at 69fd70c7ff31d3
2. HEAD at 69fd70c7ff31d3 and reverting 69fd70c7ff31d3

But only tomorrow.

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Tony Lindgren Dec. 10, 2018, 3:44 p.m. UTC | #8
* Tony Lindgren <tony@atomide.com> [181210 14:49]:
> * Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 09:52]:
> > On 10/12/2018 9.05, Peter Ujfalusi wrote:
> > > Works fine on bbb + audio cape.
> > > For some reason my am335x-evm-sk is not booting up at all w/ linux-next,
> > > but I believe it is not related to this (disabled audio and still not
> > > booting).
> > 
> > bisect on next-20181207 (am335x-evm-sk) points to:
> > Author: Tony Lindgren <tony@atomide.com>
> > 87fc89ced3a78f7f0845afab1934d509ef4ad0f2
> > ARM: dts: am335x: Move l4 child devices to probe them with ti-sysc
> > 
> > when looking for the non booting of am335x-evm-sk (nothing printed on
> > serial after stating kernel).
> 
> OK I'm pretty sure this is because we now need to move the gpio1
> ti,no-reset-on-init up to the module level because of the DDR being
> GPIO controlled. I'll send a patch out shortly for that.
> 
> It might be also worth adding a check for having ti,no-reset-on-init
> at the child level to ti-sysc driver too.

Looks like we have quite a few boards variants with probably
DDR powered by a gpio1 pin. So let's fix the ti-sysc driver first,
care to try the following patch?

Regards,

Tony

8< ---------------------------
From tony Mon Sep 17 00:00:00 2001
From: Tony Lindgren <tony@atomide.com>
Date: Mon, 10 Dec 2018 07:26:04 -0800
Subject: [PATCH] bus: ti-sysc: Check for no-reset and no-idle flags at the
 child level

With ti-sysc, we need to now have the device tree properties for
ti,no-reset-on-idle and ti,no-idle-on-init at the module level instead
of the child device level.

Let's check for these properties at the child device level to enable
quirks, and warn about moving the properties to the module level.

Otherwise am335x-evm based boards tagging gpio1 with ti,no-reset-on-init
will have their DDR power disabled if wired up in such a tricky way.

Note that this should not be an issue for earlier kernels as we don't
rely on this until the dts files have been updated to probe with ti-sysc
interconnect target driver.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reported-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/bus/ti-sysc.c | 32 +++++++++++++++++++++++++-------
 1 file changed, 25 insertions(+), 7 deletions(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -91,6 +91,9 @@ struct sysc {
 	struct delayed_work idle_work;
 };
 
+static void sysc_parse_dts_quirks(struct sysc *ddata, struct device_node *np,
+				  bool is_child);
+
 void sysc_write(struct sysc *ddata, int offset, u32 value)
 {
 	writel_relaxed(value, ddata->module_va + offset);
@@ -379,6 +382,7 @@ static int sysc_check_one_child(struct sysc *ddata,
 		dev_warn(ddata->dev, "really a child ti,hwmods property?");
 
 	sysc_check_quirk_stdout(ddata, np);
+	sysc_parse_dts_quirks(ddata, np, true);
 
 	return 0;
 }
@@ -1279,23 +1283,37 @@ static const struct sysc_dts_quirk sysc_dts_quirks[] = {
 	  .mask = SYSC_QUIRK_NO_RESET_ON_INIT, },
 };
 
-static int sysc_init_dts_quirks(struct sysc *ddata)
+static void sysc_parse_dts_quirks(struct sysc *ddata, struct device_node *np,
+				  bool is_child)
 {
-	struct device_node *np = ddata->dev->of_node;
 	const struct property *prop;
-	int i, len, error;
-	u32 val;
-
-	ddata->legacy_mode = of_get_property(np, "ti,hwmods", NULL);
+	int i, len;
 
 	for (i = 0; i < ARRAY_SIZE(sysc_dts_quirks); i++) {
-		prop = of_get_property(np, sysc_dts_quirks[i].name, &len);
+		const char *name = sysc_dts_quirks[i].name;
+
+		prop = of_get_property(np, name, &len);
 		if (!prop)
 			continue;
 
 		ddata->cfg.quirks |= sysc_dts_quirks[i].mask;
+		if (is_child) {
+			dev_warn(ddata->dev,
+				 "dts flag should be at module level for %s\n",
+				 name);
+		}
 	}
+}
+
+static int sysc_init_dts_quirks(struct sysc *ddata)
+{
+	struct device_node *np = ddata->dev->of_node;
+	int error;
+	u32 val;
+
+	ddata->legacy_mode = of_get_property(np, "ti,hwmods", NULL);
 
+	sysc_parse_dts_quirks(ddata, np, false);
 	error = of_property_read_u32(np, "ti,sysc-delay-us", &val);
 	if (!error) {
 		if (val > 255) {
Peter Ujfalusi Dec. 10, 2018, 4:14 p.m. UTC | #9
Tony,

On 10/12/2018 17.44, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [181210 14:49]:
>> * Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 09:52]:
>>> On 10/12/2018 9.05, Peter Ujfalusi wrote:
>>>> Works fine on bbb + audio cape.
>>>> For some reason my am335x-evm-sk is not booting up at all w/ linux-next,
>>>> but I believe it is not related to this (disabled audio and still not
>>>> booting).
>>>
>>> bisect on next-20181207 (am335x-evm-sk) points to:
>>> Author: Tony Lindgren <tony@atomide.com>
>>> 87fc89ced3a78f7f0845afab1934d509ef4ad0f2
>>> ARM: dts: am335x: Move l4 child devices to probe them with ti-sysc
>>>
>>> when looking for the non booting of am335x-evm-sk (nothing printed on
>>> serial after stating kernel).
>>
>> OK I'm pretty sure this is because we now need to move the gpio1
>> ti,no-reset-on-init up to the module level because of the DDR being
>> GPIO controlled. I'll send a patch out shortly for that.
>>
>> It might be also worth adding a check for having ti,no-reset-on-init
>> at the child level to ti-sysc driver too.
> 
> Looks like we have quite a few boards variants with probably
> DDR powered by a gpio1 pin. So let's fix the ti-sysc driver first,
> care to try the following patch?

am335x-evmsk is still not booting with this patch on top of next-20181210.

Fwiw 'git grep ti,no-reset-on-idle' yields no results...
Where it should be?

> 
> Regards,
> 
> Tony
> 
> 8< ---------------------------
> From tony Mon Sep 17 00:00:00 2001
> From: Tony Lindgren <tony@atomide.com>
> Date: Mon, 10 Dec 2018 07:26:04 -0800
> Subject: [PATCH] bus: ti-sysc: Check for no-reset and no-idle flags at the
>  child level
> 
> With ti-sysc, we need to now have the device tree properties for
> ti,no-reset-on-idle and ti,no-idle-on-init at the module level instead
> of the child device level.
> 
> Let's check for these properties at the child device level to enable
> quirks, and warn about moving the properties to the module level.
> 
> Otherwise am335x-evm based boards tagging gpio1 with ti,no-reset-on-init
> will have their DDR power disabled if wired up in such a tricky way.
> 
> Note that this should not be an issue for earlier kernels as we don't
> rely on this until the dts files have been updated to probe with ti-sysc
> interconnect target driver.
> 
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Reported-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/bus/ti-sysc.c | 32 +++++++++++++++++++++++++-------
>  1 file changed, 25 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
> --- a/drivers/bus/ti-sysc.c
> +++ b/drivers/bus/ti-sysc.c
> @@ -91,6 +91,9 @@ struct sysc {
>  	struct delayed_work idle_work;
>  };
>  
> +static void sysc_parse_dts_quirks(struct sysc *ddata, struct device_node *np,
> +				  bool is_child);
> +
>  void sysc_write(struct sysc *ddata, int offset, u32 value)
>  {
>  	writel_relaxed(value, ddata->module_va + offset);
> @@ -379,6 +382,7 @@ static int sysc_check_one_child(struct sysc *ddata,
>  		dev_warn(ddata->dev, "really a child ti,hwmods property?");
>  
>  	sysc_check_quirk_stdout(ddata, np);
> +	sysc_parse_dts_quirks(ddata, np, true);
>  
>  	return 0;
>  }
> @@ -1279,23 +1283,37 @@ static const struct sysc_dts_quirk sysc_dts_quirks[] = {
>  	  .mask = SYSC_QUIRK_NO_RESET_ON_INIT, },
>  };
>  
> -static int sysc_init_dts_quirks(struct sysc *ddata)
> +static void sysc_parse_dts_quirks(struct sysc *ddata, struct device_node *np,
> +				  bool is_child)
>  {
> -	struct device_node *np = ddata->dev->of_node;
>  	const struct property *prop;
> -	int i, len, error;
> -	u32 val;
> -
> -	ddata->legacy_mode = of_get_property(np, "ti,hwmods", NULL);
> +	int i, len;
>  
>  	for (i = 0; i < ARRAY_SIZE(sysc_dts_quirks); i++) {
> -		prop = of_get_property(np, sysc_dts_quirks[i].name, &len);
> +		const char *name = sysc_dts_quirks[i].name;
> +
> +		prop = of_get_property(np, name, &len);
>  		if (!prop)
>  			continue;
>  
>  		ddata->cfg.quirks |= sysc_dts_quirks[i].mask;
> +		if (is_child) {
> +			dev_warn(ddata->dev,
> +				 "dts flag should be at module level for %s\n",
> +				 name);
> +		}
>  	}
> +}
> +
> +static int sysc_init_dts_quirks(struct sysc *ddata)
> +{
> +	struct device_node *np = ddata->dev->of_node;
> +	int error;
> +	u32 val;
> +
> +	ddata->legacy_mode = of_get_property(np, "ti,hwmods", NULL);
>  
> +	sysc_parse_dts_quirks(ddata, np, false);
>  	error = of_property_read_u32(np, "ti,sysc-delay-us", &val);
>  	if (!error) {
>  		if (val > 255) {
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Tony Lindgren Dec. 10, 2018, 4:21 p.m. UTC | #10
* Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 16:13]:
> Tony,
> 
> On 10/12/2018 17.44, Tony Lindgren wrote:
> > * Tony Lindgren <tony@atomide.com> [181210 14:49]:
> >> * Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 09:52]:
> >>> On 10/12/2018 9.05, Peter Ujfalusi wrote:
> >>>> Works fine on bbb + audio cape.
> >>>> For some reason my am335x-evm-sk is not booting up at all w/ linux-next,
> >>>> but I believe it is not related to this (disabled audio and still not
> >>>> booting).
> >>>
> >>> bisect on next-20181207 (am335x-evm-sk) points to:
> >>> Author: Tony Lindgren <tony@atomide.com>
> >>> 87fc89ced3a78f7f0845afab1934d509ef4ad0f2
> >>> ARM: dts: am335x: Move l4 child devices to probe them with ti-sysc
> >>>
> >>> when looking for the non booting of am335x-evm-sk (nothing printed on
> >>> serial after stating kernel).
> >>
> >> OK I'm pretty sure this is because we now need to move the gpio1
> >> ti,no-reset-on-init up to the module level because of the DDR being
> >> GPIO controlled. I'll send a patch out shortly for that.
> >>
> >> It might be also worth adding a check for having ti,no-reset-on-init
> >> at the child level to ti-sysc driver too.
> > 
> > Looks like we have quite a few boards variants with probably
> > DDR powered by a gpio1 pin. So let's fix the ti-sysc driver first,
> > care to try the following patch?
> 
> am335x-evmsk is still not booting with this patch on top of next-20181210.

Oh interesting.

> Fwiw 'git grep ti,no-reset-on-idle' yields no results...
> Where it should be?

Sorry it should be ti,no-reset-on-init.

Regards,

Tony
Tony Lindgren Dec. 10, 2018, 4:38 p.m. UTC | #11
* Tony Lindgren <tony@atomide.com> [181210 16:21]:
> * Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 16:13]:
> > am335x-evmsk is still not booting with this patch on top of next-20181210.
> 
> Oh interesting.

OK so to prevent the hwmod code from resetting gpios very
early, this now might become necessary. Care to try with
this also applied?

Regards,

Tony

8< ------------------------
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
@@ -516,24 +516,8 @@ struct omap_hwmod am33xx_epwmss2_hwmod = {
 	},
 };
 
-/*
- * 'gpio' class: for gpio 0,1,2,3
- */
-static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
-	.rev_offs	= 0x0000,
-	.sysc_offs	= 0x0010,
-	.syss_offs	= 0x0114,
-	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
-			  SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-			  SYSS_HAS_RESET_STATUS),
-	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-			  SIDLE_SMART_WKUP),
-	.sysc_fields	= &omap_hwmod_sysc_type1,
-};
-
 struct omap_hwmod_class am33xx_gpio_hwmod_class = {
 	.name		= "gpio",
-	.sysc		= &am33xx_gpio_sysc,
 	.rev		= 2,
 };
Peter Ujfalusi Dec. 10, 2018, 5:01 p.m. UTC | #12
On 10/12/2018 18.38, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [181210 16:21]:
>> * Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 16:13]:
>>> am335x-evmsk is still not booting with this patch on top of next-20181210.
>>
>> Oh interesting.
> 
> OK so to prevent the hwmod code from resetting gpios very
> early, this now might become necessary. Care to try with
> this also applied?

With this applied there is life on the console, however it ends up badly:

[    3.511211] OF: graph: no port node found in /ocp/interconnect@48000000/segment@300000/target-module@e000/lcdc@0
[    3.522149] OF: graph: no port node found in /ocp/interconnect@48000000/segment@300000/target-module@e000/lcdc@0
[    3.533488] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[    3.541752] pgd = (ptrval)
[    3.544521] [00000000] *pgd=00000000
[    3.548163] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[    3.553502] Modules linked in:
[    3.556584] CPU: 0 PID: 66 Comm: kworker/0:3 Not tainted 4.20.0-rc6-next-20181210-00102-g6da59622c934-dirty #276
[    3.566804] Hardware name: Generic AM33XX (Flattened Device Tree)
[    3.572947] Workqueue: events dbs_work_handler
[    3.577434] PC is at tilcdc_crtc_update_clk+0xc/0x98
[    3.582429] LR is at cpufreq_transition+0x1c/0x24
[    3.587155] pc : [<c057e524>]    lr : [<c057fd50>]    psr: 60000013
[    3.593450] sp : cf5e7e20  ip : 0ee06000  fp : 00000000
[    3.598698] r10: ffffffff  r9 : cf5e7ebc  r8 : 00000000
[    3.603946] r7 : 00000001  r6 : cf5e7ebc  r5 : 00000000  r4 : 00000000
[    3.610503] r3 : c057fd34  r2 : cf5e7ebc  r1 : 00000001  r0 : 00000000
[    3.617063] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    3.624231] Control: 10c5387d  Table: 80004019  DAC: 00000051
[    3.630005] Process kworker/0:3 (pid: 66, stack limit = 0x(ptrval))
[    3.636302] Stack: (0xcf5e7e20 to 0xcf5e8000)
[    3.640688] 7e20: 00000000 fffffffe cf5e7ebc 00000001 00000000 c057fd50 00000000 c01555d8
[    3.648909] 7e40: c0e6a26c c0e6a258 00000000 00000000 00000001 c015599c 00000000 c06e5548
[    3.657131] 7e60: cf5e7ebc cf5c3b00 c0e09264 c0e6a258 00000003 00000000 000afc80 c01559d0
[    3.665353] 7e80: 00000000 000afc80 cf5c3b00 c06e9994 cf5c3b00 cf5e7ebc 00000000 c0eae910
[    3.673575] 7ea0: 00000003 c06e9a64 cf5c3b00 00000000 c0e09108 c06e9f94 cf5dee00 00000000
[    3.681797] 7ec0: 000927c0 000afc80 00000021 71a56597 cf159688 cf5c3b00 cf5dee00 cf5d9c40
[    3.690019] 7ee0: cf5d9c40 cf5ded80 cf5ded80 cf5dee3c ffffe000 c06ed2c8 cf5dee38 cf5e1380
[    3.698240] 7f00: cf5dee04 cf5c3b00 c0e6a5d4 00000000 cf5dee3c c06edd80 cf5dee38 cf5e1380
[    3.706461] 7f20: cfb69ec0 cfb6d000 00000000 c014e284 00000008 cfb69ed8 cf5e1380 cf5e1394
[    3.714683] 7f40: cfb69ec0 00000008 cfb69ed8 c0e03d00 cfb69ec0 c014ef74 cf5e01c0 cf5e0180
[    3.722905] 7f60: ffffe000 00000000 cf5e01c0 cf5e0180 cf5e6000 cf5e1380 c014ef48 cf05feac
[    3.731127] 7f80: cf5e01dc c0153d40 00000000 cf5e0180 c0153c10 00000000 00000000 00000000
[    3.739348] 7fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[    3.747568] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    3.755789] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[    3.764028] [<c057e524>] (tilcdc_crtc_update_clk) from [<c057fd50>] (cpufreq_transition+0x1c/0x24)
[    3.773045] [<c057fd50>] (cpufreq_transition) from [<c01555d8>] (notifier_call_chain+0x48/0x80)
[    3.781794] [<c01555d8>] (notifier_call_chain) from [<c015599c>] (__srcu_notifier_call_chain+0x44/0x60)
[    3.791238] [<c015599c>] (__srcu_notifier_call_chain) from [<c01559d0>] (srcu_notifier_call_chain+0x18/0x20)
[    3.801126] [<c01559d0>] (srcu_notifier_call_chain) from [<c06e9994>] (cpufreq_notify_transition+0x64/0x110)
[    3.811008] [<c06e9994>] (cpufreq_notify_transition) from [<c06e9a64>] (cpufreq_freq_transition_end+0x24/0x90)
[    3.821061] [<c06e9a64>] (cpufreq_freq_transition_end) from [<c06e9f94>] (__cpufreq_driver_target+0x1b8/0x514)
[    3.831118] [<c06e9f94>] (__cpufreq_driver_target) from [<c06ed2c8>] (od_dbs_update+0x130/0x15c)
[    3.839952] [<c06ed2c8>] (od_dbs_update) from [<c06edd80>] (dbs_work_handler+0x28/0x58)
[    3.848003] [<c06edd80>] (dbs_work_handler) from [<c014e284>] (process_one_work+0x1e4/0x3f4)
[    3.856487] [<c014e284>] (process_one_work) from [<c014ef74>] (worker_thread+0x2c/0x574)
[    3.864628] [<c014ef74>] (worker_thread) from [<c0153d40>] (kthread+0x130/0x148)
[    3.872068] [<c0153d40>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[    3.879323] Exception stack(0xcf5e7fb0 to 0xcf5e7ff8)
[    3.884400] 7fa0:                                     00000000 00000000 00000000 00000000
[    3.892621] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    3.900840] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    3.907493] Code: e12fff1e e92d41f0 e1a04000 e1a05000 (e4946014) 
[    3.913743] ---[ end trace 3f613bd9d55096fe ]---
[    3.922546] mmc1: new SDIO card at address 0001
[    3.928074] OF: graph: no port node found in /ocp/interconnect@48000000/segment@300000/target-module@e000/lcdc@0
[    3.938547] tilcdc 4830e000.lcdc: no encoders/connectors found


> 
> Regards,
> 
> Tony
> 
> 8< ------------------------
> diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
> --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
> @@ -516,24 +516,8 @@ struct omap_hwmod am33xx_epwmss2_hwmod = {
>  	},
>  };
>  
> -/*
> - * 'gpio' class: for gpio 0,1,2,3
> - */
> -static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
> -	.rev_offs	= 0x0000,
> -	.sysc_offs	= 0x0010,
> -	.syss_offs	= 0x0114,
> -	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
> -			  SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
> -			  SYSS_HAS_RESET_STATUS),
> -	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
> -			  SIDLE_SMART_WKUP),
> -	.sysc_fields	= &omap_hwmod_sysc_type1,
> -};
> -
>  struct omap_hwmod_class am33xx_gpio_hwmod_class = {
>  	.name		= "gpio",
> -	.sysc		= &am33xx_gpio_sysc,
>  	.rev		= 2,
>  };
>  
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Tony Lindgren Dec. 10, 2018, 5:23 p.m. UTC | #13
* Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 17:00]:
> On 10/12/2018 18.38, Tony Lindgren wrote:
> > OK so to prevent the hwmod code from resetting gpios very
> > early, this now might become necessary. Care to try with
> > this also applied?
> 
> With this applied there is life on the console, however it ends up badly:

OK thanks for testing. I'll take a look on how to skip
early reset for omap_hwmod.c for the dts case instead of
dropping the sysc platform data.

For the LCDC, does the following revert fix it? If so,
I need to check the flags for am33xx_lcdc_hwmod
HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY.

Regards,

Tony

8< -------------------------
diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
--- a/arch/arm/boot/dts/am33xx-l4.dtsi
+++ b/arch/arm/boot/dts/am33xx-l4.dtsi
@@ -2053,13 +2053,7 @@
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges = <0x0 0xe000 0x1000>;
-
-			lcdc: lcdc@0 {
-				compatible = "ti,am33xx-tilcdc";
-				reg = <0x0 0x1000>;
-				interrupts = <36>;
-				status = "disabled";
-			};
+			status = "disabled";
 		};
 
 		target-module@10000 {			/* 0x48310000, ap 76 4e.1 */
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -393,6 +393,14 @@
 			};
 		};
 
+		lcdc: lcdc@4830e000 {
+			compatible = "ti,am33xx-tilcdc";
+			reg = <0x4830e000 0x1000>;
+			interrupts = <36>;
+			ti,hwmods = "lcdc";
+			status = "disabled";
+		};
+
 		emif: emif@4c000000 {
 			compatible = "ti,emif-am3352";
 			reg = <0x4c000000 0x1000000>;
Tony Lindgren Dec. 10, 2018, 10:20 p.m. UTC | #14
* Tony Lindgren <tony@atomide.com> [181210 16:38]:
> * Tony Lindgren <tony@atomide.com> [181210 16:21]:
> > * Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 16:13]:
> > > am335x-evmsk is still not booting with this patch on top of next-20181210.
> > 
> > Oh interesting.
> 
> OK so to prevent the hwmod code from resetting gpios very
> early, this now might become necessary. Care to try with
> this also applied?

I posted two patches adding more checks for the module flags
so the patch below should no be needed any longer.

Regards,

Tony

> 8< ------------------------
> diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
> --- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
> @@ -516,24 +516,8 @@ struct omap_hwmod am33xx_epwmss2_hwmod = {
>  	},
>  };
>  
> -/*
> - * 'gpio' class: for gpio 0,1,2,3
> - */
> -static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
> -	.rev_offs	= 0x0000,
> -	.sysc_offs	= 0x0010,
> -	.syss_offs	= 0x0114,
> -	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
> -			  SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
> -			  SYSS_HAS_RESET_STATUS),
> -	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
> -			  SIDLE_SMART_WKUP),
> -	.sysc_fields	= &omap_hwmod_sysc_type1,
> -};
> -
>  struct omap_hwmod_class am33xx_gpio_hwmod_class = {
>  	.name		= "gpio",
> -	.sysc		= &am33xx_gpio_sysc,
>  	.rev		= 2,
>  };
>
Peter Ujfalusi Dec. 11, 2018, 7:11 a.m. UTC | #15
Tony,

On 10/12/2018 19.23, Tony Lindgren wrote:
> * Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 17:00]:
>> On 10/12/2018 18.38, Tony Lindgren wrote:
>>> OK so to prevent the hwmod code from resetting gpios very
>>> early, this now might become necessary. Care to try with
>>> this also applied?
>>
>> With this applied there is life on the console, however it ends up badly:
> 
> OK thanks for testing. I'll take a look on how to skip
> early reset for omap_hwmod.c for the dts case instead of
> dropping the sysc platform data.
> 
> For the LCDC, does the following revert fix it? If so,
> I need to check the flags for am33xx_lcdc_hwmod
> HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY.

Unfortunately, not :(

I have applied the two patch you have sent, plus this (next-20181210):
[    3.481142] OF: graph: no port node found in /ocp/lcdc@4830e000
[    3.487627] OF: graph: no port node found in /ocp/lcdc@4830e000
[    3.494810] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[    3.503182] pgd = (ptrval)
[    3.505957] [00000000] *pgd=00000000
[    3.509645] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[    3.514986] Modules linked in:
[    3.518068] CPU: 0 PID: 66 Comm: kworker/0:3 Not tainted 4.20.0-rc6-next-20181210-00104-g77bc75e7d444 #277
[    3.527763] Hardware name: Generic AM33XX (Flattened Device Tree)
[    3.533906] Workqueue: events dbs_work_handler
[    3.538393] PC is at tilcdc_crtc_update_clk+0xc/0x98
[    3.543387] LR is at cpufreq_transition+0x1c/0x24
[    3.548112] pc : [<c057e524>]    lr : [<c057fd50>]    psr: 60000013
[    3.554408] sp : cf5e5e20  ip : 0ee06000  fp : 00000000
[    3.559655] r10: ffffffff  r9 : cf5e5ebc  r8 : 00000000
[    3.564904] r7 : 00000001  r6 : cf5e5ebc  r5 : 00000000  r4 : 00000000
[    3.571461] r3 : c057fd34  r2 : cf5e5ebc  r1 : 00000001  r0 : 00000000
[    3.578020] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    3.585188] Control: 10c5387d  Table: 80004019  DAC: 00000051
[    3.590961] Process kworker/0:3 (pid: 66, stack limit = 0x(ptrval))
[    3.597257] Stack: (0xcf5e5e20 to 0xcf5e6000)
[    3.601641] 5e20: 00000000 fffffffe cf5e5ebc 00000001 00000000 c057fd50 00000000 c01555d8
[    3.609862] 5e40: c0e6a26c c0e6a258 00000000 00000000 00000001 c015599c 00000000 c06e5548
[    3.618082] 5e60: cf5e5ebc cf5c3a00 c0e09264 c0e6a258 00000003 00000000 000afc80 c01559d0
[    3.626303] 5e80: 00000000 000afc80 cf5c3a00 c06e9994 cf5c3a00 cf5e5ebc 00000000 c0eae910
[    3.634523] 5ea0: 00000003 c06e9a64 cf5c3a00 00000000 c0e09108 c06e9f94 cf5e1900 00000000
[    3.642745] 5ec0: 000927c0 000afc80 00000021 71a56597 cf159688 cf5c3a00 cf5e1900 cf5d9a80
[    3.650966] 5ee0: cf5d9a80 cf5e1880 cf5e1880 cf5e193c ffffe000 c06ed2c8 cf5e1938 cf5de080
[    3.659187] 5f00: cf5e1904 cf5c3a00 c0e6a5d4 00000000 cf5e193c c06edd80 cf5e1938 cf5de080
[    3.667408] 5f20: cfb69ec0 cfb6d000 00000000 c014e284 00000008 cfb69ed8 cf5de080 cf5de094
[    3.675628] 5f40: cfb69ec0 00000008 cfb69ed8 c0e03d00 cfb69ec0 c014ef74 cf5dd000 cf5d9fc0
[    3.683849] 5f60: ffffe000 00000000 cf5dd000 cf5d9fc0 cf5e4000 cf5de080 c014ef48 cf05feac
[    3.692069] 5f80: cf5dd01c c0153d40 00000000 cf5d9fc0 c0153c10 00000000 00000000 00000000
[    3.700289] 5fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[    3.708509] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    3.716730] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[    3.724969] [<c057e524>] (tilcdc_crtc_update_clk) from [<c057fd50>] (cpufreq_transition+0x1c/0x24)
[    3.733986] [<c057fd50>] (cpufreq_transition) from [<c01555d8>] (notifier_call_chain+0x48/0x80)
[    3.742734] [<c01555d8>] (notifier_call_chain) from [<c015599c>] (__srcu_notifier_call_chain+0x44/0x60)
[    3.752178] [<c015599c>] (__srcu_notifier_call_chain) from [<c01559d0>] (srcu_notifier_call_chain+0x18/0x20)
[    3.762067] [<c01559d0>] (srcu_notifier_call_chain) from [<c06e9994>] (cpufreq_notify_transition+0x64/0x110)
[    3.771949] [<c06e9994>] (cpufreq_notify_transition) from [<c06e9a64>] (cpufreq_freq_transition_end+0x24/0x90)
[    3.782003] [<c06e9a64>] (cpufreq_freq_transition_end) from [<c06e9f94>] (__cpufreq_driver_target+0x1b8/0x514)
[    3.792059] [<c06e9f94>] (__cpufreq_driver_target) from [<c06ed2c8>] (od_dbs_update+0x130/0x15c)
[    3.800892] [<c06ed2c8>] (od_dbs_update) from [<c06edd80>] (dbs_work_handler+0x28/0x58)
[    3.808941] [<c06edd80>] (dbs_work_handler) from [<c014e284>] (process_one_work+0x1e4/0x3f4)
[    3.817424] [<c014e284>] (process_one_work) from [<c014ef74>] (worker_thread+0x2c/0x574)
[    3.825564] [<c014ef74>] (worker_thread) from [<c0153d40>] (kthread+0x130/0x148)
[    3.833004] [<c0153d40>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[    3.840259] Exception stack(0xcf5e5fb0 to 0xcf5e5ff8)
[    3.845335] 5fa0:                                     00000000 00000000 00000000 00000000
[    3.853555] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    3.861773] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    3.868428] Code: e12fff1e e92d41f0 e1a04000 e1a05000 (e4946014) 
[    3.874674] ---[ end trace d8042f7454b3c9d1 ]---
[    3.883368] mmc1: new SDIO card at address 0001
[    3.889008] OF: graph: no port node found in /ocp/lcdc@4830e000
[    3.895127] tilcdc 4830e000.lcdc: no encoders/connectors found



> 
> Regards,
> 
> Tony
> 
> 8< -------------------------
> diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
> --- a/arch/arm/boot/dts/am33xx-l4.dtsi
> +++ b/arch/arm/boot/dts/am33xx-l4.dtsi
> @@ -2053,13 +2053,7 @@
>  			#address-cells = <1>;
>  			#size-cells = <1>;
>  			ranges = <0x0 0xe000 0x1000>;
> -
> -			lcdc: lcdc@0 {
> -				compatible = "ti,am33xx-tilcdc";
> -				reg = <0x0 0x1000>;
> -				interrupts = <36>;
> -				status = "disabled";
> -			};
> +			status = "disabled";
>  		};
>  
>  		target-module@10000 {			/* 0x48310000, ap 76 4e.1 */
> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
> --- a/arch/arm/boot/dts/am33xx.dtsi
> +++ b/arch/arm/boot/dts/am33xx.dtsi
> @@ -393,6 +393,14 @@
>  			};
>  		};
>  
> +		lcdc: lcdc@4830e000 {
> +			compatible = "ti,am33xx-tilcdc";
> +			reg = <0x4830e000 0x1000>;
> +			interrupts = <36>;
> +			ti,hwmods = "lcdc";
> +			status = "disabled";
> +		};
> +
>  		emif: emif@4c000000 {
>  			compatible = "ti,emif-am3352";
>  			reg = <0x4c000000 0x1000000>;
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Peter Ujfalusi Dec. 11, 2018, 8:20 a.m. UTC | #16
Tony,

On 11/12/2018 9.11, Peter Ujfalusi wrote:
> Tony,
> 
> On 10/12/2018 19.23, Tony Lindgren wrote:
>> * Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 17:00]:
>>> On 10/12/2018 18.38, Tony Lindgren wrote:
>>>> OK so to prevent the hwmod code from resetting gpios very
>>>> early, this now might become necessary. Care to try with
>>>> this also applied?
>>>
>>> With this applied there is life on the console, however it ends up badly:
>>
>> OK thanks for testing. I'll take a look on how to skip
>> early reset for omap_hwmod.c for the dts case instead of
>> dropping the sysc platform data.
>>
>> For the LCDC, does the following revert fix it? If so,
>> I need to check the flags for am33xx_lcdc_hwmod
>> HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY.
> 
> Unfortunately, not :(
> 
> I have applied the two patch you have sent, plus this (next-20181210):
> [    3.481142] OF: graph: no port node found in /ocp/lcdc@4830e000
> [    3.487627] OF: graph: no port node found in /ocp/lcdc@4830e000
> [    3.494810] Unable to handle kernel NULL pointer dereference at virtual address 00000000
> [    3.503182] pgd = (ptrval)
> [    3.505957] [00000000] *pgd=00000000
> [    3.509645] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
> [    3.514986] Modules linked in:
> [    3.518068] CPU: 0 PID: 66 Comm: kworker/0:3 Not tainted 4.20.0-rc6-next-20181210-00104-g77bc75e7d444 #277
> [    3.527763] Hardware name: Generic AM33XX (Flattened Device Tree)
> [    3.533906] Workqueue: events dbs_work_handler
> [    3.538393] PC is at tilcdc_crtc_update_clk+0xc/0x98
> [    3.543387] LR is at cpufreq_transition+0x1c/0x24
> [    3.548112] pc : [<c057e524>]    lr : [<c057fd50>]    psr: 60000013
> [    3.554408] sp : cf5e5e20  ip : 0ee06000  fp : 00000000
> [    3.559655] r10: ffffffff  r9 : cf5e5ebc  r8 : 00000000
> [    3.564904] r7 : 00000001  r6 : cf5e5ebc  r5 : 00000000  r4 : 00000000
> [    3.571461] r3 : c057fd34  r2 : cf5e5ebc  r1 : 00000001  r0 : 00000000
> [    3.578020] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
> [    3.585188] Control: 10c5387d  Table: 80004019  DAC: 00000051
> [    3.590961] Process kworker/0:3 (pid: 66, stack limit = 0x(ptrval))
> [    3.597257] Stack: (0xcf5e5e20 to 0xcf5e6000)
> [    3.601641] 5e20: 00000000 fffffffe cf5e5ebc 00000001 00000000 c057fd50 00000000 c01555d8
> [    3.609862] 5e40: c0e6a26c c0e6a258 00000000 00000000 00000001 c015599c 00000000 c06e5548
> [    3.618082] 5e60: cf5e5ebc cf5c3a00 c0e09264 c0e6a258 00000003 00000000 000afc80 c01559d0
> [    3.626303] 5e80: 00000000 000afc80 cf5c3a00 c06e9994 cf5c3a00 cf5e5ebc 00000000 c0eae910
> [    3.634523] 5ea0: 00000003 c06e9a64 cf5c3a00 00000000 c0e09108 c06e9f94 cf5e1900 00000000
> [    3.642745] 5ec0: 000927c0 000afc80 00000021 71a56597 cf159688 cf5c3a00 cf5e1900 cf5d9a80
> [    3.650966] 5ee0: cf5d9a80 cf5e1880 cf5e1880 cf5e193c ffffe000 c06ed2c8 cf5e1938 cf5de080
> [    3.659187] 5f00: cf5e1904 cf5c3a00 c0e6a5d4 00000000 cf5e193c c06edd80 cf5e1938 cf5de080
> [    3.667408] 5f20: cfb69ec0 cfb6d000 00000000 c014e284 00000008 cfb69ed8 cf5de080 cf5de094
> [    3.675628] 5f40: cfb69ec0 00000008 cfb69ed8 c0e03d00 cfb69ec0 c014ef74 cf5dd000 cf5d9fc0
> [    3.683849] 5f60: ffffe000 00000000 cf5dd000 cf5d9fc0 cf5e4000 cf5de080 c014ef48 cf05feac
> [    3.692069] 5f80: cf5dd01c c0153d40 00000000 cf5d9fc0 c0153c10 00000000 00000000 00000000
> [    3.700289] 5fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
> [    3.708509] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> [    3.716730] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
> [    3.724969] [<c057e524>] (tilcdc_crtc_update_clk) from [<c057fd50>] (cpufreq_transition+0x1c/0x24)
> [    3.733986] [<c057fd50>] (cpufreq_transition) from [<c01555d8>] (notifier_call_chain+0x48/0x80)
> [    3.742734] [<c01555d8>] (notifier_call_chain) from [<c015599c>] (__srcu_notifier_call_chain+0x44/0x60)
> [    3.752178] [<c015599c>] (__srcu_notifier_call_chain) from [<c01559d0>] (srcu_notifier_call_chain+0x18/0x20)
> [    3.762067] [<c01559d0>] (srcu_notifier_call_chain) from [<c06e9994>] (cpufreq_notify_transition+0x64/0x110)
> [    3.771949] [<c06e9994>] (cpufreq_notify_transition) from [<c06e9a64>] (cpufreq_freq_transition_end+0x24/0x90)
> [    3.782003] [<c06e9a64>] (cpufreq_freq_transition_end) from [<c06e9f94>] (__cpufreq_driver_target+0x1b8/0x514)
> [    3.792059] [<c06e9f94>] (__cpufreq_driver_target) from [<c06ed2c8>] (od_dbs_update+0x130/0x15c)
> [    3.800892] [<c06ed2c8>] (od_dbs_update) from [<c06edd80>] (dbs_work_handler+0x28/0x58)
> [    3.808941] [<c06edd80>] (dbs_work_handler) from [<c014e284>] (process_one_work+0x1e4/0x3f4)
> [    3.817424] [<c014e284>] (process_one_work) from [<c014ef74>] (worker_thread+0x2c/0x574)
> [    3.825564] [<c014ef74>] (worker_thread) from [<c0153d40>] (kthread+0x130/0x148)
> [    3.833004] [<c0153d40>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
> [    3.840259] Exception stack(0xcf5e5fb0 to 0xcf5e5ff8)
> [    3.845335] 5fa0:                                     00000000 00000000 00000000 00000000
> [    3.853555] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> [    3.861773] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
> [    3.868428] Code: e12fff1e e92d41f0 e1a04000 e1a05000 (e4946014) 
> [    3.874674] ---[ end trace d8042f7454b3c9d1 ]---
> [    3.883368] mmc1: new SDIO card at address 0001
> [    3.889008] OF: graph: no port node found in /ocp/lcdc@4830e000
> [    3.895127] tilcdc 4830e000.lcdc: no encoders/connectors found

It looks like there is a bug in tilcdc as well, but the display is not
coming up because the backlight is not proping:
[    0.618627] ecap 48304000.epwmss:ecap@48304100: invalid resource
[    0.618822] ecap: probe of 48304000.epwmss:ecap@48304100 failed with
error -22

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Peter Ujfalusi Dec. 11, 2018, 10:55 a.m. UTC | #17
On 11/12/2018 10.20, Peter Ujfalusi wrote:
> Tony,
> 
> On 11/12/2018 9.11, Peter Ujfalusi wrote:
>> Tony,
>>
>> On 10/12/2018 19.23, Tony Lindgren wrote:
>>> * Peter Ujfalusi <peter.ujfalusi@ti.com> [181210 17:00]:
>>>> On 10/12/2018 18.38, Tony Lindgren wrote:
>>>>> OK so to prevent the hwmod code from resetting gpios very
>>>>> early, this now might become necessary. Care to try with
>>>>> this also applied?
>>>>
>>>> With this applied there is life on the console, however it ends up badly:
>>>
>>> OK thanks for testing. I'll take a look on how to skip
>>> early reset for omap_hwmod.c for the dts case instead of
>>> dropping the sysc platform data.
>>>
>>> For the LCDC, does the following revert fix it? If so,
>>> I need to check the flags for am33xx_lcdc_hwmod
>>> HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY.
>>
>> Unfortunately, not :(
>>
>> I have applied the two patch you have sent, plus this (next-20181210):
>> [    3.481142] OF: graph: no port node found in /ocp/lcdc@4830e000
>> [    3.487627] OF: graph: no port node found in /ocp/lcdc@4830e000
>> [    3.494810] Unable to handle kernel NULL pointer dereference at virtual address 00000000
>> [    3.503182] pgd = (ptrval)
>> [    3.505957] [00000000] *pgd=00000000
>> [    3.509645] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
>> [    3.514986] Modules linked in:
>> [    3.518068] CPU: 0 PID: 66 Comm: kworker/0:3 Not tainted 4.20.0-rc6-next-20181210-00104-g77bc75e7d444 #277
>> [    3.527763] Hardware name: Generic AM33XX (Flattened Device Tree)
>> [    3.533906] Workqueue: events dbs_work_handler
>> [    3.538393] PC is at tilcdc_crtc_update_clk+0xc/0x98
>> [    3.543387] LR is at cpufreq_transition+0x1c/0x24
>> [    3.548112] pc : [<c057e524>]    lr : [<c057fd50>]    psr: 60000013
>> [    3.554408] sp : cf5e5e20  ip : 0ee06000  fp : 00000000
>> [    3.559655] r10: ffffffff  r9 : cf5e5ebc  r8 : 00000000
>> [    3.564904] r7 : 00000001  r6 : cf5e5ebc  r5 : 00000000  r4 : 00000000
>> [    3.571461] r3 : c057fd34  r2 : cf5e5ebc  r1 : 00000001  r0 : 00000000
>> [    3.578020] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
>> [    3.585188] Control: 10c5387d  Table: 80004019  DAC: 00000051
>> [    3.590961] Process kworker/0:3 (pid: 66, stack limit = 0x(ptrval))
>> [    3.597257] Stack: (0xcf5e5e20 to 0xcf5e6000)
>> [    3.601641] 5e20: 00000000 fffffffe cf5e5ebc 00000001 00000000 c057fd50 00000000 c01555d8
>> [    3.609862] 5e40: c0e6a26c c0e6a258 00000000 00000000 00000001 c015599c 00000000 c06e5548
>> [    3.618082] 5e60: cf5e5ebc cf5c3a00 c0e09264 c0e6a258 00000003 00000000 000afc80 c01559d0
>> [    3.626303] 5e80: 00000000 000afc80 cf5c3a00 c06e9994 cf5c3a00 cf5e5ebc 00000000 c0eae910
>> [    3.634523] 5ea0: 00000003 c06e9a64 cf5c3a00 00000000 c0e09108 c06e9f94 cf5e1900 00000000
>> [    3.642745] 5ec0: 000927c0 000afc80 00000021 71a56597 cf159688 cf5c3a00 cf5e1900 cf5d9a80
>> [    3.650966] 5ee0: cf5d9a80 cf5e1880 cf5e1880 cf5e193c ffffe000 c06ed2c8 cf5e1938 cf5de080
>> [    3.659187] 5f00: cf5e1904 cf5c3a00 c0e6a5d4 00000000 cf5e193c c06edd80 cf5e1938 cf5de080
>> [    3.667408] 5f20: cfb69ec0 cfb6d000 00000000 c014e284 00000008 cfb69ed8 cf5de080 cf5de094
>> [    3.675628] 5f40: cfb69ec0 00000008 cfb69ed8 c0e03d00 cfb69ec0 c014ef74 cf5dd000 cf5d9fc0
>> [    3.683849] 5f60: ffffe000 00000000 cf5dd000 cf5d9fc0 cf5e4000 cf5de080 c014ef48 cf05feac
>> [    3.692069] 5f80: cf5dd01c c0153d40 00000000 cf5d9fc0 c0153c10 00000000 00000000 00000000
>> [    3.700289] 5fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
>> [    3.708509] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
>> [    3.716730] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
>> [    3.724969] [<c057e524>] (tilcdc_crtc_update_clk) from [<c057fd50>] (cpufreq_transition+0x1c/0x24)
>> [    3.733986] [<c057fd50>] (cpufreq_transition) from [<c01555d8>] (notifier_call_chain+0x48/0x80)
>> [    3.742734] [<c01555d8>] (notifier_call_chain) from [<c015599c>] (__srcu_notifier_call_chain+0x44/0x60)
>> [    3.752178] [<c015599c>] (__srcu_notifier_call_chain) from [<c01559d0>] (srcu_notifier_call_chain+0x18/0x20)
>> [    3.762067] [<c01559d0>] (srcu_notifier_call_chain) from [<c06e9994>] (cpufreq_notify_transition+0x64/0x110)
>> [    3.771949] [<c06e9994>] (cpufreq_notify_transition) from [<c06e9a64>] (cpufreq_freq_transition_end+0x24/0x90)
>> [    3.782003] [<c06e9a64>] (cpufreq_freq_transition_end) from [<c06e9f94>] (__cpufreq_driver_target+0x1b8/0x514)
>> [    3.792059] [<c06e9f94>] (__cpufreq_driver_target) from [<c06ed2c8>] (od_dbs_update+0x130/0x15c)
>> [    3.800892] [<c06ed2c8>] (od_dbs_update) from [<c06edd80>] (dbs_work_handler+0x28/0x58)
>> [    3.808941] [<c06edd80>] (dbs_work_handler) from [<c014e284>] (process_one_work+0x1e4/0x3f4)
>> [    3.817424] [<c014e284>] (process_one_work) from [<c014ef74>] (worker_thread+0x2c/0x574)
>> [    3.825564] [<c014ef74>] (worker_thread) from [<c0153d40>] (kthread+0x130/0x148)
>> [    3.833004] [<c0153d40>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
>> [    3.840259] Exception stack(0xcf5e5fb0 to 0xcf5e5ff8)
>> [    3.845335] 5fa0:                                     00000000 00000000 00000000 00000000
>> [    3.853555] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
>> [    3.861773] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
>> [    3.868428] Code: e12fff1e e92d41f0 e1a04000 e1a05000 (e4946014) 
>> [    3.874674] ---[ end trace d8042f7454b3c9d1 ]---
>> [    3.883368] mmc1: new SDIO card at address 0001
>> [    3.889008] OF: graph: no port node found in /ocp/lcdc@4830e000
>> [    3.895127] tilcdc 4830e000.lcdc: no encoders/connectors found
> 
> It looks like there is a bug in tilcdc as well, but the display is not
> coming up because the backlight is not proping:
> [    0.618627] ecap 48304000.epwmss:ecap@48304100: invalid resource
> [    0.618822] ecap: probe of 48304000.epwmss:ecap@48304100 failed with
> error -22

Sent a patch to fix the ecap:
ARM: dts: am33xx-l4: Fix epwmssX/ecapX/ehrpwmX ranges and reg

Now LCD is working.

> 
> - Péter
> 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Tony Lindgren Dec. 11, 2018, 2:18 p.m. UTC | #18
* Peter Ujfalusi <peter.ujfalusi@ti.com> [181211 10:53]:
> > It looks like there is a bug in tilcdc as well, but the display is not
> > coming up because the backlight is not proping:
> > [    0.618627] ecap 48304000.epwmss:ecap@48304100: invalid resource
> > [    0.618822] ecap: probe of 48304000.epwmss:ecap@48304100 failed with
> > error -22
> 
> Sent a patch to fix the ecap:
> ARM: dts: am33xx-l4: Fix epwmssX/ecapX/ehrpwmX ranges and reg
> 
> Now LCD is working.

OK good to hear. I did not get LCD enabled on am335x-evm even with
adding 800x600 EDID file.

Regards,

Tony
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
--- a/arch/arm/boot/dts/am33xx-l4.dtsi
+++ b/arch/arm/boot/dts/am33xx-l4.dtsi
@@ -824,7 +824,9 @@ 
 	ranges = <0x00000000 0x48000000 0x100000>,	/* segment 0 */
 		 <0x00100000 0x48100000 0x100000>,	/* segment 1 */
 		 <0x00200000 0x48200000 0x100000>,	/* segment 2 */
-		 <0x00300000 0x48300000 0x100000>;	/* segment 3 */
+		 <0x00300000 0x48300000 0x100000>,	/* segment 3 */
+		 <0x46000000 0x46000000 0x400000>,	/* l3 data port */
+		 <0x46400000 0x46400000 0x400000>;	/* l3 data port */
 
 	segment@0 {					/* 0x48000000 */
 		compatible = "simple-bus";
@@ -881,7 +883,9 @@ 
 			 <0x000cc000 0x000cc000 0x001000>,	/* ap 89 */
 			 <0x000cd000 0x000cd000 0x001000>,	/* ap 90 */
 			 <0x000ca000 0x000ca000 0x001000>,	/* ap 91 */
-			 <0x000cb000 0x000cb000 0x001000>;	/* ap 92 */
+			 <0x000cb000 0x000cb000 0x001000>,	/* ap 92 */
+			 <0x46000000 0x46000000 0x400000>,	/* l3 data port */
+			 <0x46400000 0x46400000 0x400000>;	/* l3 data port */
 
 		target-module@8000 {			/* 0x48008000, ap 6 10.0 */
 			compatible = "ti,sysc";
@@ -1055,8 +1059,21 @@ 
 			clock-names = "fck";
 			#address-cells = <1>;
 			#size-cells = <1>;
-			ranges = <0x0 0x38000 0x2000>;
-			status = "disabled";
+			ranges = <0x0 0x38000 0x2000>,
+				 <0x46000000 0x46000000 0x400000>;
+
+			mcasp0: mcasp@0 {
+				compatible = "ti,am33xx-mcasp-audio";
+				reg = <0x0 0x2000>,
+				      <0x46000000 0x400000>;
+				reg-names = "mpu", "dat";
+				interrupts = <80>, <81>;
+				interrupt-names = "tx", "rx";
+				status = "disabled";
+				dmas = <&edma 8 2>,
+					<&edma 9 2>;
+				dma-names = "tx", "rx";
+			};
 		};
 
 		target-module@3c000 {			/* 0x4803c000, ap 20 32.0 */
@@ -1073,8 +1090,21 @@ 
 			clock-names = "fck";
 			#address-cells = <1>;
 			#size-cells = <1>;
-			ranges = <0x0 0x3c000 0x2000>;
-			status = "disabled";
+			ranges = <0x0 0x3c000 0x2000>,
+				 <0x46400000 0x46400000 0x400000>;
+
+			mcasp1: mcasp@0 {
+				compatible = "ti,am33xx-mcasp-audio";
+				reg = <0x0 0x2000>,
+				      <0x46400000 0x400000>;
+				reg-names = "mpu", "dat";
+				interrupts = <82>, <83>;
+				interrupt-names = "tx", "rx";
+				status = "disabled";
+				dmas = <&edma 10 2>,
+					<&edma 11 2>;
+				dma-names = "tx", "rx";
+			};
 		};
 
 		target-module@40000 {			/* 0x48040000, ap 22 1e.0 */
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -440,36 +440,7 @@ 
 			       <&edma 5 0>;
 			dma-names = "tx", "rx";
 		};
-
-		mcasp0: mcasp@48038000 {
-			compatible = "ti,am33xx-mcasp-audio";
-			ti,hwmods = "mcasp0";
-			reg = <0x48038000 0x2000>,
-			      <0x46000000 0x400000>;
-			reg-names = "mpu", "dat";
-			interrupts = <80>, <81>;
-			interrupt-names = "tx", "rx";
-			status = "disabled";
-			dmas = <&edma 8 2>,
-				<&edma 9 2>;
-			dma-names = "tx", "rx";
-		};
-
-		mcasp1: mcasp@4803c000 {
-			compatible = "ti,am33xx-mcasp-audio";
-			ti,hwmods = "mcasp1";
-			reg = <0x4803C000 0x2000>,
-			      <0x46400000 0x400000>;
-			reg-names = "mpu", "dat";
-			interrupts = <82>, <83>;
-			interrupt-names = "tx", "rx";
-			status = "disabled";
-			dmas = <&edma 10 2>,
-				<&edma 11 2>;
-			dma-names = "tx", "rx";
-		};
 	};
-
 };
 
 #include "am33xx-l4.dtsi"