[meta-freescale] Device tree question

Nikolay Dimitrov picmaster at mail.bg
Mon Jul 13 09:04:34 PDT 2015


Hi Gary,

On 07/13/2015 06:53 PM, Gary Thomas wrote:
> On 2015-07-13 09:18, Gary Thomas wrote:
>> On 2015-07-13 09:14, Robin Findley wrote:
>>> On 07/13/2015 10:37 AM, Gary Thomas wrote:
>>>> A bit off topic, but perhaps someone here knows the answer :-)
>>>>
>>>> If my device tree has a device/element that is enabled, why would
>>>> that device be disabled when I boot?  I have this on my (LS1021) board:
>>>>           quadspi at 1550000 {
>>>>               compatible = "fsl,ls1-qspi";
>>>>               #address-cells = <0x00000001>;
>>>>               #size-cells = <0x00000000>;
>>>>               reg = <0x00000000 0x01550000 0x00000000 0x00010000
>>>> 0x00000000
>>> 0x40000000 0x00000000 0x04000000>;
>>>>               reg-names = "QuadSPI", "QuadSPI-memory";
>>>>               interrupts = <0x00000000 0x00000083 0x00000004>;
>>>>               clock-names = "qspi_en", "qspi";
>>>>               clocks = <0x00000003 0x00000001 0x00000003 0x00000001>;
>>>>               big-endian;
>>>>               amba-base = <0x40000000>;
>>>>               num-cs = <0x00000002>;
>>>>               status = "okay";
>>>>               s70fl01gs at 0 {
>>>>                   #address-cells = <0x00000001>;
>>>>                   #size-cells = <0x00000001>;
>>>>                   compatible = "spansion,s70fl01gs";
>>>>                   spi-max-frequency = <0x02faf080>;
>>>>                   reg = <0x00000000>;
>>>>                   partition at 0 {
>>>>                       label = "s70fl01gs-0";
>>>>                       reg = <0x00000000 0x04000000>;
>>>>                   };
>>>>               };
>>>>           };
>>>>
>>>> However when I boot the system, this device is disabled.
>>>>     # cat /proc/device-tree/soc/quadspi at 1550000/status
>>>>     disabled
>>>> I know this must happen very early on as the device driver
>>>> for this device is never even probed.
>>>>
>>>> Any ideas where/why this becomes disabled and how I keep that
>>>> from happening?
>>>
>>>
>>> Have you checked the rest of your device tree files (top-level and
>>> includes)
>>> to see if quadspi is referenced anywhere else?  A later assignment can
>>> override an earlier one.
>>
>> Yes and no, there are no overrides.
>>
>> Besides, the listing above is from dumping the compiled device
>> tree using fdtdump, so includes and multiple sections addressing
>> the same element have been collapsed.
>
> I found the culprit!  My quadspi element was being disabled
> by U-Boot (not sure why, this was just part of the LS102x common code)
>

That's cool. I was just about to suggest you to debug your driver's
probe function :D.

Have a great day! Regards,
Nikolay


More information about the meta-freescale mailing list