24 May, 2017

1 commit

  • Right now the u-boot,dm-pre-reloc flag will make each marked node
    always appear in both spl and tpl. But systems needing an additional
    tpl might have special constraints for each, like the spl needing to
    be very tiny.

    So introduce two additional flags to mark nodes for only spl or tpl
    environments and introduce a function dm_fdt_pre_reloc to automate
    the necessary checks in code instances checking for pre-relocation
    flags.

    The behaviour of the original flag stays untouched and still marks
    a node for both spl and tpl.

    Signed-off-by: Heiko Stuebner
    Reviewed-by: Simon Glass
    Tested-by: Kever Yang

    Heiko Stübner
     

14 Oct, 2016

1 commit

  • These have now landed upstream. The naming is different and in one case the
    function signature has changed. Update the code to match.

    This applies the following upstream commits by
    Thierry Reding :

    604e61e fdt: Add functions to retrieve strings
    8702bd1 fdt: Add a function to get the index of a string
    2218387 fdt: Add a function to count strings

    Signed-off-by: Simon Glass

    Simon Glass
     

21 Aug, 2016

1 commit


25 May, 2016

1 commit


22 Jan, 2016

2 commits

  • GPIO drivers want to be able to show if a pin is enabled for input, output,
    or is being used by another function. Some drivers can easily find this
    and the code is included in the driver. For some SoCs this is more complex.
    Conceptually this should be handled by pinctrl rather than GPIO. Most
    pinctrl drivers will have this feature anyway.

    Add a method by which a GPIO driver can obtain the pin mux value given a
    GPIO reference. This avoids repeating the code in two places.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add a function which produces a flags word from a few common PIN_CONFIG
    settings. This is useful for simple pinctrl drivers that don't need to worry
    about drive strength, etc.

    Signed-off-by: Simon Glass

    Simon Glass
     

21 Jan, 2016

1 commit


20 Sep, 2015

1 commit

  • Commit c5acf4a2b3c6 ("pinctrl: Add the concept of peripheral IDs")
    added some additional change that was not mentioned in the git-log.

    That commit added dm_scan_fdt_node() in the pinctrl uclass binding.
    It should be handled by the simple-bus driver or the low-level
    driver, not by the pinctrl framework.

    I guess Simon's motivation was to bind GPIO banks located under the
    Rockchip pinctrl device. It is true some chips have sub-devices
    under their pinctrl devices, but it is basically SoC-specific matter.

    This commit partly reverts commit c5acf4a2b3c6 to keep the only
    pinctrl-generic features in the uclass. The dm_scan_fdt_node()
    should be called from the rk3288_pinctrl driver.

    Signed-off-by: Masahiro Yamada
    Acked-by: Simon Glass
    Tested-by: Simon Glass

    Masahiro Yamada
     

03 Sep, 2015

1 commit

  • My original pinctrl patch operating using a peripheral ID enum. This was
    shared between pinmux and clock and provides an easy way to specify a device
    that needs to be controlled, even it is does not (yet) have a driver within
    driver model.

    Masahiro's new simple pinctrl gets around this by providing a
    set_state_simple() pinctrl method. By passing a device to that call the
    peripheral ID becomes unnecessary. If the driver needs it, it can calculate
    it itself and use it internally.

    However this does not solve the problem for peripheral clocks. The 'pure'
    solution would be to pass a driver to the clock uclass also. But this
    requires that all devices should have a driver, and a struct udevide. Also
    a key optimisation of the clock uclass is allowing a peripheral clock to
    be set even when there is no device for that clock.

    There may be a better way to achive the same goal, but for now it seems
    expedient to add in peripheral ID to the pinctrl uclass. Two methods are
    added - one to get the peripheral ID and one to select it. The existing
    set_state_simple() is effectively the union of these.

    Signed-off-by: Simon Glass

    Simon Glass
     

31 Aug, 2015

1 commit

  • This creates a new framework for handling of pin control devices,
    i.e. devices that control different aspects of package pins.

    This uclass handles pinmuxing and pin configuration; pinmuxing
    controls switching among silicon blocks that share certain physical
    pins, pin configuration handles electronic properties such as pin-
    biasing, load capacitance etc.

    This framework can support the same device tree bindings, but if you
    do not need full interface support, you can disable some features to
    reduce memory foot print. Typically around 1.5KB is necessary to
    include full-featured uclass support on ARM board (CONFIG_PINCTRL +
    CONFIG_PINCTRL_FULL + CONFIG_PINCTRL_GENERIC + CONFIG_PINCTRL_PINMUX),
    for example.

    We are often limited on code size for SPL. Besides, we still have
    many boards that do not support device tree configuration. The full
    pinctrl, which requires OF_CONTROL, does not make sense for those
    boards. So, this framework also has a Do-It-Yourself (let's say
    simple pinctrl) interface. With CONFIG_PINCTRL_FULL disabled, the
    uclass itself provides no systematic mechanism for identifying the
    peripheral device, applying pinctrl settings, etc. They must be
    done in each low-level driver. In return, you can save much memory
    footprint and it might be useful especially for SPL.

    Signed-off-by: Masahiro Yamada
    Acked-by: Simon Glass

    Masahiro Yamada