[PATCH 4/5] ARM: novena: Read Ethernet MAC address from EEPROM

Ahmad Fatoum a.fatoum at pengutronix.de
Wed Jan 25 05:48:20 PST 2023


On 25.01.23 14:31, John Watts wrote:
> On Wed, Jan 25, 2023 at 09:19:23AM +0100, Sascha Hauer wrote:
>> Yes, normally it should be set up already, unless of course there is
>> some needed pinctrl configuration in an unrelated device tree node.
>>
>> Sascha
> 
> Hi Sascha,
> 
> Here's what I think is going on:
> 
> - The I2C line requires 3v3_DELAYED for pull-ups
> - The EEPROM requires 3v3_DELAYED for power
> - 3v3_DELAYED requires VGEN5 from the PMIC (acts as a gate)
> - The PMIC is loaded after the EEPROM
> 
> Most things on the board require these delayed rails, so I'm wondering
> what the approach should be here. Should I:
> 
> - Rewrite the device tree to reference these delayed rails
> - Probe the PMIC first
> 
> I did try this:
> 
> 	reg_3p3v: regulator-3p3v {
> 		compatible = "regulator-fixed";
> 		regulator-name = "3P3V_DELAYED";
> 		regulator-min-microvolt = <3300000>;
> 		regulator-max-microvolt = <3300000>;
> 		regulator-always-on;
> 		gate-supply = <&reg_vgen6>;

regulator-fixed only understands vin-supply.

> 	};
> 
> But Barebox doesn't seem to see the 'regulator-always-on' as
> 'start immediately'.

For this to work we'd need:

  of_devices_ensure_probed_by_property("regulator-always-on");
  of_devices_ensure_probed_by_property("regulator-boot-on");

somewhere in generic code. Currently, these properties are only
consulted when the device is actually probed.

I actually updated the eeprom node to use
> reg_3p3v as vcc-supply and things were still probed in the wrong order.

That's odd. You can enable CONFIG_DEBUG_PROBES to see in what order
probes happened and at what depth (each probe within a probe is
indented more than its parent).

Cheers,
Ahmad


> 
> John.
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list