Re: [PATCH] arm64: dts: allwinner: teres-i: Add GPIO port regulators

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/26/22 9:21 AM, Harald Geyer wrote:
>>>> PD, PE and PL have dedicated regulators, that can be matched via the 
>>>> 'regulator-name' property. I didn't want to specify the same 
>>>> information in two places.
>>>
>>> "regulator-name" is only a label, while phandle is actual regulator reference
>>> that can be used by the driver.
> 
> That is clearly not the whole story, as the driver find's the supply
> for the PD bank just fine. And this even isn't an always-on regulator.
> 
> See the attached dmesg logs.

You are right, the Linux function regulator_dev_lookup() falls back to matching
by regulator name if no property exists in the devicetree. But again this is a
Linux-ism that we would rather not rely on.

>>>> For the PF supply, I couldn't find any connection information in the 
>>>> board schematic. I could have added a dummy regulator. But since there 
>>>> is only one warning about pf-supply during driver initialization and
>>>> not the dozens of warnings I see about PC and PG, I figured, I'd rather
>>>> not add information of dubious use or qualiy.
>>>
>>> You mean PE right? There is no PF supply on A64.
> 
> I meant PF, but you are right, that this doesn't have a supply on A64
> at all. However the driver doesn't seem to know this: It emits a
> warning about missing PF supply at startup.
> 
>>> Anyway, if it's not on schematic, it can be assumed unconnected and thus
>>> you shouldn't define that property. Messages like "using dummy regulator"
>>> are fine in such cases .
>>
>> All of the ports without a separate VCC-Px input are powered by
>> VCC-IO, which in this case is supplied from DCDC1.
> 
> So should I add "vcc-pf-supply = <&reg_dcdc1>;" even though the chip
> actually doesn't support a dedicated vcc-pf-supply or should I just
> ignore this?

Yes, you should add this property. The supplies are a bit more abstract than you
are expecting. Each of these pin banks (unless it is totally unused) has to get
power from _somewhere_, and that "somewhere" is the supply that should be
referenced.

There is no need for the supply to be a dedicated pin, or for the supply name to
match any pin or regulator name. For example, the LRADC needs a reference
voltage for its comparator, so it has a "vref-supply" property. But there is no
"VREF" pin. The LRADC's reference voltage is one of several things internally
connected to the SoC's "AVCC" pin.

So here, vcc-pf-supply just means abstractly "the voltage supply for Port F".

The fact that sometimes there also happens to be a pin named VCC-Px is the
result of not coming up with a second name for something that has a perfectly
good name already.

Regards,
Samuel



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux