fix for lantiq (danube) usb

Martin Blumenstingl martin.blumenstingl at googlemail.com
Sun Jul 5 07:29:06 EDT 2020


Hi Luca,

On Sun, Jul 5, 2020 at 1:07 PM Luca Olivetti <luca at ventoso.org> wrote:
[...]
> I put a printk in every step of reg_fixed_regulator_probe
> (drivers/regulator/fixed.c) and it seems it isn't called at all (my
> strings are indeed compiled in fixed.o).
>
> Why is that? Perhaps an error in the dts?
unfortunately you have only given an extract of your changes instead
of the full patch, which means I don't have much context and have to
guess

> I checked and it seems the same as other devices in 19.07.3, the only
> difference is the section (most devices have it in the first section
> while here it is in the &gpio section) and the name after the colon
> (most use no name at all after the colon or the same as before, i.e.
> here it would be usb_vbus: usb_vbus ).
>
> This is the definition in the dts
>
>
>          usb_vbus: regulator-usb-vbus {
>                  compatible = "regulator-fixed";
>
>                  regulator-name = "USB_VBUS";
>
>                  regulator-min-microvolt = <5000000>;
>                  regulator-max-microvolt = <5000000>;
>
>                  gpio = <&gpio 14 GPIO_ACTIVE_HIGH>;
>                  enable-active-high;
>          };
assuming that board uses GPIO 14 with polarity "active high" this part
seems correct to me

have you tried moving it out of the &gpio node (and placing it similar
to what for example
target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts
in master uses)?
background info: device-tree nodes can not be placed in random
locations within the .dts. all nodes below top-level (where the model
property is defined for example) are supported. for all other nodes it
depends on the (driver) implementation: all nodes with compatible =
"simple-bus" are also scanned for child-nodes. However, any node
placed for example below the &usb_phy node (I didn't check the &gpio
implementation to see if it's the same) will NOT be scanned (because
the driver doesn't support that).

in case moving the &usb_vbus node fixes it we probably have to fix
three more boards as the following four all place &usb_vbus inside
&gpio (on master, only looking at Linux 5.4):
- target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts
- target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts
- target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts
- target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts

> Oh, and is there a quick way to test modifications to the dts? Every
> time I invoke make, even for a trivial change, it takes 40 minutes.
I don't know about this part of the OpenWrt build-system so I'm
passing this questions to somebody else


Best regards,
Martin



More information about the openwrt-devel mailing list