[U-Boot] [RFC 00/35] sunxi: Add initial CLK, RESET support

Chen-Yu Tsai wens at csie.org
Tue Jul 17 02:44:26 UTC 2018


On Mon, Jul 16, 2018 at 7:28 PM, Jagan Teki <jagan at amarulasolutions.com> wrote:
> This is series is trying to add initial support for CLK and RESET
> drivers for Allwinner SoC's with USB as a starting IP.
>
> Linux handle both clock and reset as ccu with common DT bindings,
> but besides that U-Boot handle them separately with individual
> generic uclass functions. So we need have a separate drivers for
> CLK and RESET with common DT binding.
>
> This series is trying to resolve this by binding the reset driver
> from CLK driver .bind call. First of all the CLK driver will probe
> based on DT compatible and the .bind call of CLK driver will bind
> the respective reset driver based on uclass driver name.
>
> I would prefer USB can be initial IP to go, since it doesn't rely on
> dm pinctrl or any other dm stuff require.
>
> Tested this on A64, H5, H3 but I still need to have closer look
> on other SoCs.
>
> All these changes available at u-boot-sunxi/clk
>
> Suggestions,
> Jagan.
>
> Andre Przywara (1):
>   sunxi: clk: add DM clock driver template for the A64 SoC
>
> Jagan Teki (34):
>   clk: Kconfig: Ascending order to sub directiory kconfigs
>   net: sun8i_emac: Make proper order for include files
>   mtd: sunxi_nand_spl: Make proper order for include files
>   dt-bindings: reset: Sync sun4i-a10-ccu.h from Linux
>   dt-bindings: clock: Sync sun5i-ccu.h from Linux
>   dt-bindings: reset: Sync sun5i-ccu.h from Linux
>   dt-bindings: clock: Sync sun6i-a31-ccu.h from Linux
>   dt-bindings: reset: Sync sun6i-a31-ccu.h from Linux

This is a preference of mine: Could you sync them all in one
go to a recent release or -rc? And also mention the version
in the commit subject? It would be much easier to maintain if
people didn't have to go dig through the Linux repository
looking for a specific git commit. Instead they could just
look at the subject and judge whether it's recent or not.

>   clk: sunxi: Add Kconfig entry
>   clk: sunxi: a64: Add disable function
>   clk: sunxi: a64: Implement USB clocks

These 3, plus Andre's patch, can be squashed into one. At this
point you actually have a driver that can do something, which is
what we're interested in, not the details of how you manage your
development cycle.

>   reset: sunxi: Add DM reset driver template for the A64 SoC
>   reset: sunxi: a64: Bind reset from clock driver
>   reset: Add default request ops
>   reset: sunxi: a64: Implement USB resets

Same here. The commits should be one adding a default request ops,
then another adding a _useful_ reset driver, complete with binding
the driver to use it.

BTW, would it make sense, or would it be possible, to have both
the clock and reset drivers in the same file? It may be possible
to share some code, such as access helpers, this way. Also,
building one but not the other doesn't make sense. At the
very least, have them share a Kconfig symbol, or make one
selected by the other and invisible to the user.

Thanks
ChenYu

>   clk: sunxi: Add initial CLK driver for H3_H5
>   reset: sunxi: Add initial RESET driver for H3_H5
>   clk: sunxi: Add initial CLK driver for A10/A20
>   reset: sunxi: Add initial RESET driver for A10/A20
>   clk: sunxi: Add initial CLK driver for A10s/A13
>   reset: sunxi: Add initial RESET driver for A10s/A13
>   clk: sunxi: Add initial CLK driver for A31/A31s
>   reset: sunxi: Add initial RESET driver for A31/A31s
>   clk: sunxi: Add initial CLK driver for A23
>   reset: sunxi: Add initial RESET driver for A23
>   clk: sunxi: a23: Add CLK support for A33
>   reset: sunxi: a23: Add RESET support A33
>   clk: sunxi: Add initial CLK driver for A83T
>   reset: sunxi: Add initial RESET driver for A83T
>   sunxi: Enable CLK and RESET
>   musb-new: sunxi: Use CLK and RESET support
>   phy: sun4i-usb: Use CLK and RESET support
>   sunxi: usb: Switch to Generic host controllers
>   usb: host: Drop [e-o]hci-sunxi drivers


More information about the U-Boot mailing list