For my use case it's perfect:

the board is powered by a cape. we disabled power from USB, because the
cape is not made to be powered by the beagle.

and yes you are right, the PPATH is hard reset to 1.

Le mar. 3 janv. 2017 à 10:53, Heinz Hummel <[email protected]> a
écrit :

> Hello Micka,
>
> is this permanent? Means does the PMIC know even after a power cycle to
> not to use USB power any more? As far as I understood the description of
> USB_EN in the PPATH register, this is reset to default values after power
> was turned off...
>
> Thanks :-)
>
>
> 2017-01-03 10:48 GMT+01:00 Micka <[email protected]>:
>
> The proper way is to modify the driver tps65217.c :
>
> diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
> index ca19130..a7ae900 100644
> --- a/drivers/mfd/tps65217.c
> +++ b/drivers/mfd/tps65217.c
> @@ -253,6 +253,7 @@ static int tps65217_probe(struct i2c_client *client,
>   bool status_off = false;
>   int irq = -1, irq_gpio = -1;
>   int ret;
> + bool usb_off = false;
>
>   node = client->dev.of_node;
>   if (node) {
> @@ -265,7 +266,8 @@ static int tps65217_probe(struct i2c_client *client,
>   chip_id = (unsigned long)match->data;
>   status_off = of_property_read_bool(node,
>   "ti,pmic-shutdown-controller");
> -
> + usb_off = of_property_read_bool(node,
> +                                        "ti,pmic-usb-off");
>   /* at first try to get irq via OF method */
>   irq = irq_of_parse_and_map(node, 0);
>   if (irq <= 0) {
> @@ -346,6 +348,16 @@ static int tps65217_probe(struct i2c_client *client,
>   dev_warn(tps->dev, "unable to set the status OFF\n");
>   }
>
> + if(usb_off){
> + ret = tps65217_set_bits(tps, TPS65217_REG_PPATH,
> +                                TPS65217_PPATH_USB_PW_ENABLE, 0,
> +                                TPS65217_PROTECT_NONE);
> +                if (ret)
> +                        dev_warn(tps->dev, "unable to set the USB power
> OFF\n");
> + else
> + dev_info(tps->dev, "set the USB power OFF\n");
> + }
> +
>   dev_info(tps->dev, "TPS65217 ID %#x version 1.%d\n",
>   (version & TPS65217_CHIPID_CHIP_MASK) >> 4,
>   version & TPS65217_CHIPID_REV_MASK);
>
>
>
> It worked for me. ( the source is not committed yet because I didn't clean
> the code )
>
>
> Le lun. 2 janv. 2017 à 08:29, Heinz Hummel <[email protected]> a
> écrit :
>
> Great - thanks! So there is no way to do that programmatically via PMIC?
>
> 2016-12-29 8:59 GMT+01:00 Alex Hayman <[email protected]>:
>
> If you cut that trace on a BBB, then the BBB won't power itself up via USB.
>
> On Friday, December 23, 2016 at 4:25:08 AM UTC-5, Heinz Hummel wrote:
>
> Hello,
>
> I have a BBB which is currently powered via USB and external power supply
> (and a similar BBG which is powered via USB and via external supply feed
> into VDD from connected cape).
>
> Now when a user wants to do a full power cycle, all possible power sources
> have to be disconnected which can be somewhat complicated.
>
> So my question: is there a possibility to disable power supply via USB?
> E.g. a soldering jumper which has to be opened? Or in case not - is there a
> possibility to permanently program the PMIC to not to power the board from
> USB?
>
> Thanks!
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
>
> You received this message because you are subscribed to a topic in the
> Google Groups "BeagleBoard" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beagleboard/dR_GhlwG0eM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/5d9e2fb6-14be-4223-9375-2882df001000%40googlegroups.com
> <https://groups.google.com/d/msgid/beagleboard/5d9e2fb6-14be-4223-9375-2882df001000%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CAHptrU72B91wEm10m1A1GhP0w8Zug-snhgJiKd1z9aCgeg504w%40mail.gmail.com
> <https://groups.google.com/d/msgid/beagleboard/CAHptrU72B91wEm10m1A1GhP0w8Zug-snhgJiKd1z9aCgeg504w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "BeagleBoard" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beagleboard/dR_GhlwG0eM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CAF%2BMRtkXjZqMm9WKaXetSTgM4zeMRtOzq53nKLXir310sp6wmg%40mail.gmail.com
> <https://groups.google.com/d/msgid/beagleboard/CAF%2BMRtkXjZqMm9WKaXetSTgM4zeMRtOzq53nKLXir310sp6wmg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
>
> For more options, visit https://groups.google.com/d/optout.
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CAHptrU7rDRZ0d6O4qGb%3Dd0XGfx%2BQtYmV_ZCkffNyQWzQ3gJs%2Bg%40mail.gmail.com
> <https://groups.google.com/d/msgid/beagleboard/CAHptrU7rDRZ0d6O4qGb%3Dd0XGfx%2BQtYmV_ZCkffNyQWzQ3gJs%2Bg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAF%2BMRtkkgMB9F7GYiwdggFAXXjBnusf%3Dh6bwRJ7qHxysNzUWOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to