[U-Boot] Passing numeric values via fdt

I have a device tree property which in the .dts looks like this: prop = <1>;
I'd like to be able to pass a 0 or 1 to this property via the 'fdt set' command, but it seems to only be able to push a string into the field, which in turn is always interpreted as 0.
How can I push a numeric '1' to my property? Do I have to change it to be a string and force my driver to manage those instead of numeric values?
Thanks

On Thu, Oct 13, 2016 at 5:48 PM, Gary Thomas gary@mlbassoc.com wrote:
I have a device tree property which in the .dts looks like this: prop = <1>;
I'd like to be able to pass a 0 or 1 to this property via the 'fdt set' command, but it seems to only be able to push a string into the field, which in turn is always interpreted as 0.
How can I push a numeric '1' to my property? Do I have to change it to be a string and force my driver to manage those instead of numeric values?
Did you tried this? for setting 1
U-boot> fdt set <full_path> 'prop' <1>
thanks!

On 2016-10-13 14:36, Jagan Teki wrote:
On Thu, Oct 13, 2016 at 5:48 PM, Gary Thomas gary@mlbassoc.com wrote:
I have a device tree property which in the .dts looks like this: prop = <1>;
I'd like to be able to pass a 0 or 1 to this property via the 'fdt set' command, but it seems to only be able to push a string into the field, which in turn is always interpreted as 0.
How can I push a numeric '1' to my property? Do I have to change it to be a string and force my driver to manage those instead of numeric values?
Did you tried this? for setting 1
U-boot> fdt set <full_path> 'prop' <1>
Yes, that worked perfectly, thanks!
Sorry if this was a simple/FAQ/RTFM question, but I didn't see it anywhere.
participants (2)
-
Gary Thomas
-
Jagan Teki