clk: Add Allwinner CLK, RESET support
Subsystems (12)
cover clk: Add Allwinner CLK, RESET support
This series is refined version of Allwinner CLK, RESET support for previous RFC[3] which implements CLK and RESET for
- USB
- MMC
- SPI
- UART
This series depends on 'musb shutdown' series [1] and Linux dts(i) sync series [2].
Since this series supporting MMC, the previous version[4] DM_MMC migration changes are squashed and droped reset and clock ccm hacks.
Tested on A64, H3, H5, R40, A83T, A20.
Note:
- added previous version fastboot, env changes as-it-is, so we can discuss for further improvements.
- V3S, A23, A33 still need to test.
All these changes available at u-boot-sunxi/clk
Any inputs,
Jagan.
[1] https://patchwork.ozlabs.org/cover/946738/
[2] https://patchwork.ozlabs.org/cover/953478/
[3] https://patchwork.ozlabs.org/cover/944313/
[4] https://patchwork.ozlabs.org/cover/944180/
Jagan Teki (42):
clk: Kconfig: Ascending order to sub directiory kconfigs
clk: Add Allwinner A64 CLK driver
reset: Add default request ops
reset: Add Allwinner RESET driver
clk: sunxi: Add Allwinner H3/H5 CLK driver
clk: sunxi: Add Allwinner A10/A20 CLK driver
clk: sunxi: Add Allwinner A10s/A13 CLK driver
clk: sunxi: Add Allwinner A31 CLK driver
clk: sunxi: Add Allwinner A23 CLK driver
clk: sunxi: a23: Add CLK support for A33
clk: sunxi: Add Allwinner A83T CLK driver
clk: sunxi: Add Allwinner R40 CLK driver
clk: sunxi: Add Allwinner V3S CLK driver
sunxi: Enable CLK
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
clk: sunxi: Implement AHB bus MMC clocks
clk: sunxi: Implement direct MMC clocks
clk: sunxi: Implement AHB bus MMC resets
reset: Add get reset by name optionally
reset: Add reset valid
dm: mmc: sunxi: Add CLK and RESET support
fastboot: sunxi: Update fastboot mmc default device
env: sunxi: Update default env fat device
sunxi: Use mmc_bootdev=2 for MMC2 boot
sunxi: A20: Enable DM_MMC
mmc: sunxi: Add mmc, emmc H5/A64 compatible
sunxi: H3_H5: Enable DM_MMC
sunxi: A64: Enable DM_MMC
mmc: sunxi: Add A83T emmc compatible
sunxi: A83T: Enable DM_MMC
sunxi: V40: Enable DM_MMC
sunxi: A13/A31: Enable DM_MMC
sunxi: A23/A33/V3S: Enable DM_MMC
clk: sunxi: Implement SPI clocks
clk: sunxi: Implement SPI resets
spi: sun4i: Add CLK support
spi: Add Allwinner A31 SPI driver
clk: sunxi: Implement UART clocks
clk: sunxi: Implement UART resets
arch/arm/include/asm/arch-sunxi/ccu.h | 82 +++ arch/arm/mach-sunxi/Kconfig | 22 + board/sunxi/board.c | 2 +- configs/A10-OLinuXino-Lime_defconfig | 1 + configs/A10s-OLinuXino-M_defconfig | 1 + configs/A13-OLinuXinoM_defconfig | 1 + configs/A13-OLinuXino_defconfig | 1 + configs/A20-OLinuXino-Lime2-eMMC_defconfig | 3 + configs/A20-OLinuXino-Lime2_defconfig | 1 + configs/A20-OLinuXino-Lime_defconfig | 1 + configs/A20-OLinuXino_MICRO-eMMC_defconfig | 1 + configs/A20-OLinuXino_MICRO_defconfig | 1 + configs/A20-Olimex-SOM-EVB_defconfig | 1 + configs/A20-Olimex-SOM204-EVB-eMMC_defconfig | 1 + configs/A20-Olimex-SOM204-EVB_defconfig | 2 + configs/Auxtek-T003_defconfig | 1 + configs/Auxtek-T004_defconfig | 1 + configs/Bananapi_defconfig | 1 + configs/Bananapi_m2m_defconfig | 1 + configs/Bananapro_defconfig | 1 + configs/CHIP_defconfig | 1 + configs/CHIP_pro_defconfig | 1 + configs/CSQ_CS908_defconfig | 1 + configs/Colombus_defconfig | 1 + configs/Cubieboard2_defconfig | 1 + configs/Cubieboard_defconfig | 1 + configs/Cubietruck_plus_defconfig | 1 + configs/Hummingbird_A31_defconfig | 1 + configs/Itead_Ibox_A20_defconfig | 1 + configs/Linksprite_pcDuino3_Nano_defconfig | 1 + configs/Linksprite_pcDuino3_defconfig | 1 + configs/Linksprite_pcDuino_defconfig | 1 + configs/MK808C_defconfig | 1 + configs/Marsboard_A10_defconfig | 1 + configs/Mele_A1000G_quad_defconfig | 1 + configs/Mele_A1000_defconfig | 1 + configs/Mele_I7_defconfig | 1 + configs/Mele_M3_defconfig | 2 + configs/Mele_M5_defconfig | 1 + configs/Mele_M9_defconfig | 1 + configs/Mini-X_defconfig | 1 + configs/Orangepi_defconfig | 1 + configs/Orangepi_mini_defconfig | 2 + configs/Sinlinx_SinA31s_defconfig | 1 + configs/Sinlinx_SinA33_defconfig | 3 + configs/Sinovoip_BPI_M2_Plus_defconfig | 1 + configs/Sinovoip_BPI_M2_defconfig | 1 + configs/Sinovoip_BPI_M3_defconfig | 1 + configs/Wexler_TAB7200_defconfig | 1 + configs/Wobo_i5_defconfig | 1 + configs/Yones_Toptech_BD1078_defconfig | 1 + configs/a64-olinuxino_defconfig | 1 + configs/amarula_a64_relic_defconfig | 2 + configs/ba10_tv_box_defconfig | 1 + configs/bananapi_m1_plus_defconfig | 1 + configs/bananapi_m64_defconfig | 1 + configs/ga10h_v1_1_defconfig | 1 + configs/h8_homlet_v2_defconfig | 1 + configs/i12-tvbox_defconfig | 1 + configs/icnova-a20-swac_defconfig | 1 + configs/inet1_defconfig | 1 + configs/inet_q972_defconfig | 1 + configs/jesurun_q5_defconfig | 1 + configs/libretech_all_h3_cc_h2_plus_defconfig | 1 + configs/libretech_all_h3_cc_h3_defconfig | 1 + configs/libretech_all_h3_cc_h5_defconfig | 1 + configs/mixtile_loftq_defconfig | 1 + configs/mk802_a10s_defconfig | 1 + configs/mk802_defconfig | 1 + configs/mk802ii_defconfig | 1 + configs/nanopi_a64_defconfig | 1 + configs/nanopi_m1_defconfig | 1 + configs/nanopi_m1_plus_defconfig | 1 + configs/nanopi_neo2_defconfig | 1 + configs/nanopi_neo_air_defconfig | 1 + configs/nanopi_neo_defconfig | 1 + configs/nanopi_neo_plus2_defconfig | 1 + configs/orangepi_2_defconfig | 1 + configs/orangepi_lite_defconfig | 1 + configs/orangepi_one_defconfig | 1 + configs/orangepi_pc2_defconfig | 1 + configs/orangepi_pc_defconfig | 1 + configs/orangepi_pc_plus_defconfig | 1 + configs/orangepi_plus2e_defconfig | 1 + configs/orangepi_plus_defconfig | 1 + configs/orangepi_prime_defconfig | 1 + configs/orangepi_r1_defconfig | 1 + configs/orangepi_win_defconfig | 1 + configs/orangepi_zero_defconfig | 1 + configs/orangepi_zero_plus2_defconfig | 1 + configs/orangepi_zero_plus_defconfig | 1 + configs/parrot_r16_defconfig | 1 + configs/pine64_plus_defconfig | 1 + configs/r7-tv-dongle_defconfig | 1 + configs/sopine_baseboard_defconfig | 1 + configs/sun8i_a23_evb_defconfig | 1 + configs/sunxi_Gemei_G9_defconfig | 1 + configs/tbs_a711_defconfig | 1 + drivers/clk/Kconfig | 9 +- drivers/clk/Makefile | 1 + drivers/clk/sunxi/Kconfig | 75 +++ drivers/clk/sunxi/Makefile | 17 + drivers/clk/sunxi/clk_a10.c | 104 ++++ drivers/clk/sunxi/clk_a10s.c | 95 ++++ drivers/clk/sunxi/clk_a23.c | 105 ++++ drivers/clk/sunxi/clk_a31.c | 126 +++++ drivers/clk/sunxi/clk_a64.c | 113 +++++ drivers/clk/sunxi/clk_a83t.c | 103 ++++ drivers/clk/sunxi/clk_h3.c | 124 +++++ drivers/clk/sunxi/clk_r40.c | 119 +++++ drivers/clk/sunxi/clk_sunxi.c | 77 +++ drivers/clk/sunxi/clk_v3s.c | 91 ++++ drivers/fastboot/Kconfig | 3 +- drivers/mmc/sunxi_mmc.c | 121 +++-- drivers/phy/allwinner/phy-sun4i-usb.c | 77 ++- drivers/reset/Kconfig | 8 + drivers/reset/Makefile | 1 + drivers/reset/reset-sunxi.c | 124 +++++ drivers/reset/reset-uclass.c | 27 +- drivers/spi/Kconfig | 6 + drivers/spi/Makefile | 1 + drivers/spi/sun4i_spi.c | 40 +- drivers/spi/sun6i_spi.c | 475 ++++++++++++++++++ drivers/usb/host/Kconfig | 2 + drivers/usb/host/Makefile | 2 - drivers/usb/host/ehci-sunxi.c | 204 -------- drivers/usb/host/ohci-sunxi.c | 233 --------- drivers/usb/musb-new/sunxi.c | 82 +-- env/Kconfig | 3 +- include/configs/sun4i.h | 4 - include/configs/sun50i.h | 5 - include/configs/sun5i.h | 4 - include/configs/sun6i.h | 4 - include/configs/sun7i.h | 4 - include/configs/sun8i.h | 4 - include/configs/sunxi-common.h | 5 +- include/reset.h | 36 ++ scripts/config_whitelist.txt | 2 - 138 files changed, 2278 insertions(+), 567 deletions(-) create mode 100644 arch/arm/include/asm/arch-sunxi/ccu.h create mode 100644 drivers/clk/sunxi/Kconfig create mode 100644 drivers/clk/sunxi/Makefile create mode 100644 drivers/clk/sunxi/clk_a10.c create mode 100644 drivers/clk/sunxi/clk_a10s.c create mode 100644 drivers/clk/sunxi/clk_a23.c create mode 100644 drivers/clk/sunxi/clk_a31.c create mode 100644 drivers/clk/sunxi/clk_a64.c create mode 100644 drivers/clk/sunxi/clk_a83t.c create mode 100644 drivers/clk/sunxi/clk_h3.c create mode 100644 drivers/clk/sunxi/clk_r40.c create mode 100644 drivers/clk/sunxi/clk_sunxi.c create mode 100644 drivers/clk/sunxi/clk_v3s.c create mode 100644 drivers/reset/reset-sunxi.c create mode 100644 drivers/spi/sun6i_spi.c delete mode 100644 drivers/usb/host/ehci-sunxi.c delete mode 100644 drivers/usb/host/ohci-sunxi.c
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 1/42 clk: Kconfig: Ascending order to sub directiory kconfigs
sourcing of sub directiory kconfig files are not in proper order, so keep them in ascending order.
--- drivers/clk/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clk/Kconfig +4 -4
@@ -83,13 +83,13 @@ config CLK_STM32MP1 Enable the STM32 clock (RCC) driver. Enable support for manipulating STM32MP1's on-SoC clocks. -source "drivers/clk/tegra/Kconfig" -source "drivers/clk/uniphier/Kconfig" -source "drivers/clk/exynos/Kconfig" source "drivers/clk/at91/Kconfig" -source "drivers/clk/renesas/Kconfig" +source "drivers/clk/exynos/Kconfig" source "drivers/clk/mvebu/Kconfig" source "drivers/clk/owl/Kconfig" +source "drivers/clk/renesas/Kconfig" +source "drivers/clk/tegra/Kconfig" +source "drivers/clk/uniphier/Kconfig" config ICS8N3QV01 bool "Enable ICS8N3QV01 VCXO driver"
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 2/42 clk: Add Allwinner A64 CLK driver
In reply to Jagan TekiAdd initial clock driver for Allwinner A64.
Implement USB clock enable and disable functions for OHCI, EHCI, OTG and USBPHY gate and clock registers.
--- arch/arm/include/asm/arch-sunxi/ccu.h | 47 ++++++++++++++++++++ drivers/clk/Kconfig | 1 + drivers/clk/Makefile | 1 + drivers/clk/sunxi/Kconfig | 18 ++++++++ drivers/clk/sunxi/Makefile | 9 ++++ drivers/clk/sunxi/clk_a64.c | 62 +++++++++++++++++++++++++++ drivers/clk/sunxi/clk_sunxi.c | 58 +++++++++++++++++++++++++ 7 files changed, 196 insertions(+) create mode 100644 arch/arm/include/asm/arch-sunxi/ccu.h create mode 100644 drivers/clk/sunxi/Kconfig create mode 100644 drivers/clk/sunxi/Makefile create mode 100644 drivers/clk/sunxi/clk_a64.c create mode 100644 drivers/clk/sunxi/clk_sunxi.c
arch/arm/include/asm/arch-sunxi/ccu.h new file +47 -0
@@ -0,0 +1,47 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* +* Copyright (C) 2018 Amarula Solutions. +* Author: Jagan Teki <[email protected]> +*/ + +#ifndef _ASM_ARCH_CCU_H +#define _ASM_ARCH_CCU_H + +/** +* ccu_clk_map - common clock unit clock map +* +* @off: ccu clock offset +* @bit: ccu clock bit value +* @ccu_clk_set_rate: ccu clock set rate func +*/ +struct ccu_clk_map { +u16 off; +u32 bit; +int (*ccu_clk_set_rate)(void *base,u32 bit,ulong rate); +}; + +/** +* struct ccu_desc - common clock unit descriptor +* +* @clks: mapping clocks descriptor +* @num_clks: number of mapped clocks +*/ +struct ccu_desc { +struct ccu_clk_map *clks; +unsigned long num_clks; +}; + +/** +* struct sunxi_clk_priv - sunxi clock private structure +* +* @base: base address +* @desc: ccu descriptor +*/ +struct sunxi_clk_priv { +void *base; +const struct ccu_desc *desc; +}; + +extern struct clk_ops sunxi_clk_ops; + +#endif /* _ASM_ARCH_CCU_H */
drivers/clk/Kconfig +1 -0
@@ -88,6 +88,7 @@ source "drivers/clk/exynos/Kconfig" source "drivers/clk/mvebu/Kconfig" source "drivers/clk/owl/Kconfig" source "drivers/clk/renesas/Kconfig" +source "drivers/clk/sunxi/Kconfig" source "drivers/clk/tegra/Kconfig" source "drivers/clk/uniphier/Kconfig"
drivers/clk/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-y += tegra/ obj-$(CONFIG_ARCH_ASPEED) += aspeed/ obj-$(CONFIG_ARCH_MESON) += clk_meson.o obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/ +obj-$(CONFIG_ARCH_SUNXI) += sunxi/ obj-$(CONFIG_CLK_AT91) += at91/ obj-$(CONFIG_CLK_MVEBU) += mvebu/ obj-$(CONFIG_CLK_BCM6345) += clk_bcm6345.o
drivers/clk/sunxi/Kconfig new file +18 -0
@@ -0,0 +1,18 @@ +config CLK_SUNXI + bool "Clock support for Allwinner SoCs" + depends on CLK && ARCH_SUNXI + default y + help + This enables support for common clock driver API on Allwinner + SoCs. + +if CLK_SUNXI + +config CLK_SUN50I_A64 + bool "Clock driver for Allwinner A64" + default MACH_SUN50I + help + This enables common clock driver support for platforms based + on Allwinner A64 SoC. + +endif # CLK_SUNXI
drivers/clk/sunxi/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# +# Copyright (C) 2018 Amarula Solutions. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-$(CONFIG_CLK_SUNXI) += clk_sunxi.o + +obj-$(CONFIG_CLK_SUN50I_A64) += clk_a64.o
drivers/clk/sunxi/clk_a64.c new file +62 -0
62 lines not on this page · raw message
drivers/clk/sunxi/clk_sunxi.c new file +58 -0
58 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 3/42 reset: Add default request ops
In reply to Jagan TekiMissing request ops from respective uclass driver generating "synchronous abort" in Allwinner platform, may be in arm. So add default request ops and give a chance to uclass driver to think whether they really need request or not.
--- drivers/reset/reset-uclass.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/reset/reset-uclass.c +9 -1
@@ -14,6 +14,11 @@ static inline struct reset_ops *reset_dev_ops(struct udevice *dev)return (struct reset_ops *)dev->driver->ops; } +static int reset_request_default (struct reset_ctl *reset_ctl) +{ +return 0 ; +} +static int reset_of_xlate_default (struct reset_ctl *reset_ctl,struct ofnode_phandle_args *args) {
@@ -69,7 +74,10 @@ int reset_get_by_index(struct udevice *dev, int index,return ret; } - ret = ops->request (reset_ctl); +if (ops->request) + ret = ops->request (reset_ctl); +else + ret =reset_request_default (reset_ctl);if (ret) {debug ("ops->request() failed: %d\n" , ret);return ret;
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 4/42 reset: Add Allwinner RESET driver
In reply to Jagan TekiAdd common reset driver for all Allwinner SoC's.
Since CLK and RESET share common DT compatible, it is CLK driver job is to bind the reset driver. So add CLK bind call on respective SoC driver by passing ccu map descriptor so-that reset deassert, deassert operations held based on reset register map defined by CLK driver.
Select DM_RESET via CLK_SUNXI, this make hidden section of RESET since CLK and RESET share common DT compatible and code.
--- arch/arm/include/asm/arch-sunxi/ccu.h | 25 ++++++ drivers/clk/sunxi/Kconfig | 1 + drivers/clk/sunxi/clk_a64.c | 22 +++++ drivers/reset/Kconfig | 8 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-sunxi.c | 124 ++++++++++++++++++++++++++ 6 files changed, 181 insertions(+) create mode 100644 drivers/reset/reset-sunxi.c
arch/arm/include/asm/arch-sunxi/ccu.h +25 -0
@@ -20,15 +20,31 @@ struct ccu_clk_map {int (*ccu_clk_set_rate)(void *base,u32 bit,ulong rate); }; +/** +* ccu_reset_map - common clock unit reset map +* +* @off: ccu reset offset +* @bit: ccu reset bit value +*/ +struct ccu_reset_map { +u16 off; +u32 bit; +}; +/** * struct ccu_desc - common clock unit descriptor * * @clks: mapping clocks descriptor * @num_clks: number of mapped clocks +* @resets: mapping resets descriptor +* @num_resets: number of mapped resets */ struct ccu_desc {struct ccu_clk_map *clks;unsigned long num_clks; + +struct ccu_reset_map *resets; +unsigned long num_resets; };/**
@@ -44,4 +60,13 @@ struct sunxi_clk_priv {extern struct clk_ops sunxi_clk_ops; +/** +* sunxi_reset_bind() - reset binding +* +* @dev: reset device +* @count: reset count +* @return 0 success, or error value +*/ +int sunxi_reset_bind (struct udevice *dev,ulong count); +#endif /* _ASM_ARCH_CCU_H */
drivers/clk/sunxi/Kconfig +1 -0
@@ -1,6 +1,7 @@ config CLK_SUNXI bool "Clock support for Allwinner SoCs" depends on CLK && ARCH_SUNXI + select DM_RESET default y help This enables support for common clock driver API on Allwinner
drivers/clk/sunxi/clk_a64.c +22 -0
@@ -10,6 +10,7 @@#include <errno.h> #include <asm/arch/ccu.h> #include <dt-bindings/clock/sun50i-a64-ccu.h> +#include <dt-bindings/reset/sun50i-a64-ccu.h> static struct ccu_clk_map a64_clks[] = { [CLK_BUS_OTG ] = {0x060 ,BIT (23 ),NULL },
@@ -26,9 +27,24 @@ static struct ccu_clk_map a64_clks[] = { [CLK_USB_OHCI1] = { 0x0cc, BIT(17), NULL }, }; +static struct ccu_reset_map a64_resets[] = { + [RST_USB_PHY0 ] = {0x0cc ,BIT (0 ) }, + [RST_USB_PHY1 ] = {0x0cc ,BIT (1 ) }, + [RST_USB_HSIC ] = {0x0cc ,BIT (2 ) }, + + [RST_BUS_OTG ] = {0x2c0 ,BIT (23 ) }, + [RST_BUS_EHCI0 ] = {0x2c0 ,BIT (24 ) }, + [RST_BUS_EHCI1 ] = {0x2c0 ,BIT (25 ) }, + [RST_BUS_OHCI0 ] = {0x2c0 ,BIT (28 ) }, + [RST_BUS_OHCI1 ] = {0x2c0 ,BIT (29 ) }, +}; +static const struct ccu_desc sun50i_a64_ccu_desc = { .clks = a64_clks, .num_clks =ARRAY_SIZE (a64_clks), + + .resets = a64_resets, + .num_resets =ARRAY_SIZE (a64_resets), };static int a64_clk_probe (struct udevice *dev)
@@ -46,6 +62,11 @@ static int a64_clk_probe(struct udevice *dev)return 0 ; } +static int a64_clk_bind (struct udevice *dev) +{ +return sunxi_reset_bind (dev,50 ); +} +static const struct udevice_id a64_clk_ids[] = { { .compatible ="allwinner,sun50i-a64-ccu" , .data = (ulong)&sun50i_a64_ccu_desc },
@@ -59,4 +80,5 @@ U_BOOT_DRIVER(clk_sun50i_a64) = { .priv_auto_alloc_size = sizeof(struct sunxi_clk_priv), .ops = &sunxi_clk_ops, .probe = a64_clk_probe, + .bind = a64_clk_bind, };
drivers/reset/Kconfig +8 -0
@@ -98,4 +98,12 @@ config RESET_SOCFPGA help Support for reset controller on SoCFPGA platform. +config RESET_SUNXI + bool "RESET support for Allwinner SoCs" + depends on DM_RESET && ARCH_SUNXI + default y + help + This enables support for common reset driver for + Allwinner SoCs. + endmenu
drivers/reset/Makefile +1 -0
@@ -15,3 +15,4 @@ obj-$(CONFIG_AST2500_RESET) += ast2500-reset.o obj-$(CONFIG_RESET_ROCKCHIP) += reset-rockchip.o obj-$(CONFIG_RESET_MESON) += reset-meson.o obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o +obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
drivers/reset/reset-sunxi.c new file +124 -0
124 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 5/42 clk: sunxi: Add Allwinner H3/H5 CLK driver
In reply to Jagan TekiAdd initial clock driver for Allwinner H3/H5.
- Implement USB bus and USB clocks via ccu_clk_map descriptor for H3/H5, so it can accessed in common clk enable and disable functions from clk_sunxi.c
- Implement USB bus and USB resets via ccu_reset_map descriptor for H3/H5, so it can accessed in common reset deassert and assert functions from reset-sunxi.c
--- drivers/clk/sunxi/Kconfig | 7 +++ drivers/clk/sunxi/Makefile | 1 + drivers/clk/sunxi/clk_h3.c | 97 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 drivers/clk/sunxi/clk_h3.c
drivers/clk/sunxi/Kconfig +7 -0
@@ -9,6 +9,13 @@ config CLK_SUNXI if CLK_SUNXI +config CLK_SUN8I_H3 + bool "Clock driver for Allwinner H3/H5" + default MACH_SUNXI_H3_H5 + help + This enables common clock driver support for platforms based + on Allwinner H3/H5 SoC. + config CLK_SUN50I_A64 bool "Clock driver for Allwinner A64" default MACH_SUN50I
drivers/clk/sunxi/Makefile +1 -0
@@ -6,4 +6,5 @@ obj-$(CONFIG_CLK_SUNXI) += clk_sunxi.o +obj-$(CONFIG_CLK_SUN8I_H3) += clk_h3.o obj-$(CONFIG_CLK_SUN50I_A64) += clk_a64.o
drivers/clk/sunxi/clk_h3.c new file +97 -0
97 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 6/42 clk: sunxi: Add Allwinner A10/A20 CLK driver
In reply to Jagan TekiAdd initial clock driver for Allwinner A10/A20.
- Implement USB ahb and USB clocks via ccu_clk_map descriptor for A10/A20, so it can accessed in common clk enable and disable functions from clk_sunxi.c
- Implement USB resets via ccu_reset_map descriptor for A10/A20, so it can accessed in common reset deassert and assert functions from reset-sunxi.c
--- drivers/clk/sunxi/Kconfig | 7 ++++ drivers/clk/sunxi/Makefile | 1 + drivers/clk/sunxi/clk_a10.c | 77 +++++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 drivers/clk/sunxi/clk_a10.c
drivers/clk/sunxi/Kconfig +7 -0
@@ -9,6 +9,13 @@ config CLK_SUNXI if CLK_SUNXI +config CLK_SUN4I_A10 + bool "Clock driver for Allwinner A10/A20" + default MACH_SUN4I || MACH_SUN7I + help + This enables common clock driver support for platforms based + on Allwinner A10/A20 SoC. + config CLK_SUN8I_H3 bool "Clock driver for Allwinner H3/H5" default MACH_SUNXI_H3_H5
drivers/clk/sunxi/Makefile +1 -0
@@ -6,5 +6,6 @@ obj-$(CONFIG_CLK_SUNXI) += clk_sunxi.o +obj-$(CONFIG_CLK_SUN4I_A10) += clk_a10.o obj-$(CONFIG_CLK_SUN8I_H3) += clk_h3.o obj-$(CONFIG_CLK_SUN50I_A64) += clk_a64.o
drivers/clk/sunxi/clk_a10.c new file +77 -0
77 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 7/42 clk: sunxi: Add Allwinner A10s/A13 CLK driver
In reply to Jagan TekiAdd initial clock driver for Allwinner A10s/A13.
- Implement USB ahb and USB clocks via ccu_clk_map descriptor for A10s/A13, so it can accessed in common clk enable and disable functions from clk_sunxi.c
- Implement USB resets via ccu_reset_map descriptor for A10s/A13, so it can accessed in common reset deassert and assert functions from reset-sunxi.c
--- drivers/clk/sunxi/Kconfig | 7 ++++ drivers/clk/sunxi/Makefile | 1 + drivers/clk/sunxi/clk_a10s.c | 74 ++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 drivers/clk/sunxi/clk_a10s.c
drivers/clk/sunxi/Kconfig +7 -0
@@ -16,6 +16,13 @@ config CLK_SUN4I_A10 This enables common clock driver support for platforms based on Allwinner A10/A20 SoC. +config CLK_SUN5I_A10S + bool "Clock driver for Allwinner A10s/A13" + default MACH_SUN5I + help + This enables common clock driver support for platforms based + on Allwinner A10s/A13 SoC. + config CLK_SUN8I_H3 bool "Clock driver for Allwinner H3/H5" default MACH_SUNXI_H3_H5
drivers/clk/sunxi/Makefile +1 -0
@@ -7,5 +7,6 @@ obj-$(CONFIG_CLK_SUNXI) += clk_sunxi.o obj-$(CONFIG_CLK_SUN4I_A10) += clk_a10.o +obj-$(CONFIG_CLK_SUN5I_A10S) += clk_a10s.o obj-$(CONFIG_CLK_SUN8I_H3) += clk_h3.o obj-$(CONFIG_CLK_SUN50I_A64) += clk_a64.o
drivers/clk/sunxi/clk_a10s.c new file +74 -0
74 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 8/42 clk: sunxi: Add Allwinner A31 CLK driver
In reply to Jagan TekiAdd initial clock driver for Allwinner A31.
- Implement USB ahb1 and USB clocks via ccu_clk_map descriptor for A31, so it can accessed in common clk enable and disable functions from clk_sunxi.c
- Implement USB ahb1 and USB resets via ccu_reset_map descriptor for A31, so it can accessed in common reset deassert and assert functions from reset-sunxi.c
--- drivers/clk/sunxi/Kconfig | 7 +++ drivers/clk/sunxi/Makefile | 1 + drivers/clk/sunxi/clk_a31.c | 86 +++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 drivers/clk/sunxi/clk_a31.c
drivers/clk/sunxi/Kconfig +7 -0
@@ -23,6 +23,13 @@ config CLK_SUN5I_A10S This enables common clock driver support for platforms based on Allwinner A10s/A13 SoC. +config CLK_SUN6I_A31 + bool "Clock driver for Allwinner A31/A31s" + default MACH_SUN6I + help + This enables common clock driver support for platforms based + on Allwinner A31/A31s SoC. + config CLK_SUN8I_H3 bool "Clock driver for Allwinner H3/H5" default MACH_SUNXI_H3_H5
drivers/clk/sunxi/Makefile +1 -0
@@ -8,5 +8,6 @@ obj-$(CONFIG_CLK_SUNXI) += clk_sunxi.o obj-$(CONFIG_CLK_SUN4I_A10) += clk_a10.o obj-$(CONFIG_CLK_SUN5I_A10S) += clk_a10s.o +obj-$(CONFIG_CLK_SUN6I_A31) += clk_a31.o obj-$(CONFIG_CLK_SUN8I_H3) += clk_h3.o obj-$(CONFIG_CLK_SUN50I_A64) += clk_a64.o
drivers/clk/sunxi/clk_a31.c new file +86 -0
86 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 9/42 clk: sunxi: Add Allwinner A23 CLK driver
In reply to Jagan TekiAdd initial clock driver for Allwinner A23.
- Implement USB bus and USB clocks via ccu_clk_map descriptor for A23, so it can accessed in common clk enable and disable functions from clk_sunxi.c
- Implement USB bus and USB resets via ccu_reset_map descriptor for A23, so it can accessed in common reset deassert and assert functions from reset-sunxi.c
--- drivers/clk/sunxi/Kconfig | 7 ++++ drivers/clk/sunxi/Makefile | 1 + drivers/clk/sunxi/clk_a23.c | 79 +++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 drivers/clk/sunxi/clk_a23.c
drivers/clk/sunxi/Kconfig +7 -0
@@ -30,6 +30,13 @@ config CLK_SUN6I_A31 This enables common clock driver support for platforms based on Allwinner A31/A31s SoC. +config CLK_SUN8I_A23 + bool "Clock driver for Allwinner A23" + default MACH_SUN8I_A23 + help + This enables common clock driver support for platforms based + on Allwinner A23 SoC. + config CLK_SUN8I_H3 bool "Clock driver for Allwinner H3/H5" default MACH_SUNXI_H3_H5
drivers/clk/sunxi/Makefile +1 -0
@@ -9,5 +9,6 @@ obj-$(CONFIG_CLK_SUNXI) += clk_sunxi.o obj-$(CONFIG_CLK_SUN4I_A10) += clk_a10.o obj-$(CONFIG_CLK_SUN5I_A10S) += clk_a10s.o obj-$(CONFIG_CLK_SUN6I_A31) += clk_a31.o +obj-$(CONFIG_CLK_SUN8I_A23) += clk_a23.o obj-$(CONFIG_CLK_SUN8I_H3) += clk_h3.o obj-$(CONFIG_CLK_SUN50I_A64) += clk_a64.o
drivers/clk/sunxi/clk_a23.c new file +79 -0
79 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 10/42 clk: sunxi: a23: Add CLK support for A33
In reply to Jagan TekiA33 has separate clock driver in Linux because of few clock differences wrt to A23 like audio etc,. these may not useful for U-Boot so added a33 ccu compatible on existing a23 clock driver.
--- drivers/clk/sunxi/Kconfig | 6 +++--- drivers/clk/sunxi/clk_a23.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/clk/sunxi/Kconfig +3 -3
@@ -31,11 +31,11 @@ config CLK_SUN6I_A31 on Allwinner A31/A31s SoC. config CLK_SUN8I_A23 - bool "Clock driver for Allwinner A23" - default MACH_SUN8I_A23 + bool "Clock driver for Allwinner A23/A33" + default MACH_SUN8I_A23 || MACH_SUN8I_A33 help This enables common clock driver support for platforms based - on Allwinner A23 SoC. + on Allwinner A23/A33 SoC. config CLK_SUN8I_H3 bool "Clock driver for Allwinner H3/H5"
drivers/clk/sunxi/clk_a23.c +2 -0
@@ -65,6 +65,8 @@ static int a23_clk_bind(struct udevice *dev)static const struct udevice_id a23_clk_ids[] = { { .compatible ="allwinner,sun8i-a23-ccu" , .data = (ulong)&sun8i_a23_ccu_desc }, + { .compatible ="allwinner,sun8i-a33-ccu" , + .data = (ulong)&sun8i_a23_ccu_desc }, { } };
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 11/42 clk: sunxi: Add Allwinner A83T CLK driver
In reply to Jagan TekiAdd initial clock driver for Allwinner A83T.
- Implement USB bus and USB clocks via ccu_clk_map descriptor for A83T, so it can accessed in common clk enable and disable functions from clk_sunxi.c
- Implement USB bus and USB resets via ccu_reset_map descriptor for A83T, so it can accessed in common reset deassert and assert functions from reset-sunxi.c
--- drivers/clk/sunxi/Kconfig | 7 ++++ drivers/clk/sunxi/Makefile | 1 + drivers/clk/sunxi/clk_a83t.c | 81 ++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 drivers/clk/sunxi/clk_a83t.c
drivers/clk/sunxi/Kconfig +7 -0
@@ -37,6 +37,13 @@ config CLK_SUN8I_A23 This enables common clock driver support for platforms based on Allwinner A23/A33 SoC. +config CLK_SUN8I_A83T + bool "Clock driver for Allwinner A83T" + default MACH_SUN8I_A83T + help + This enables common clock driver support for platforms based + on Allwinner A83T SoC. + config CLK_SUN8I_H3 bool "Clock driver for Allwinner H3/H5" default MACH_SUNXI_H3_H5
drivers/clk/sunxi/Makefile +1 -0
@@ -10,5 +10,6 @@ obj-$(CONFIG_CLK_SUN4I_A10) += clk_a10.o obj-$(CONFIG_CLK_SUN5I_A10S) += clk_a10s.o obj-$(CONFIG_CLK_SUN6I_A31) += clk_a31.o obj-$(CONFIG_CLK_SUN8I_A23) += clk_a23.o +obj-$(CONFIG_CLK_SUN8I_A83T) += clk_a83t.o obj-$(CONFIG_CLK_SUN8I_H3) += clk_h3.o obj-$(CONFIG_CLK_SUN50I_A64) += clk_a64.o
drivers/clk/sunxi/clk_a83t.c new file +81 -0
81 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 12/42 clk: sunxi: Add Allwinner R40 CLK driver
In reply to Jagan TekiAdd initial clock driver for Allwinner R40.
- Implement USB bus and USB clocks via ccu_clk_map descriptor for R40, so it can accessed in common clk enable and disable functions from clk_sunxi.c
- Implement USB bus and USB resets via ccu_reset_map descriptor for R40, so it can accessed in common reset deassert and assert functions from reset-sunxi.c
--- drivers/clk/sunxi/Kconfig | 7 +++ drivers/clk/sunxi/Makefile | 1 + drivers/clk/sunxi/clk_r40.c | 89 +++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 drivers/clk/sunxi/clk_r40.c
drivers/clk/sunxi/Kconfig +7 -0
@@ -44,6 +44,13 @@ config CLK_SUN8I_A83T This enables common clock driver support for platforms based on Allwinner A83T SoC. +config CLK_SUN8I_R40 + bool "Clock driver for Allwinner R40" + default MACH_SUN8I_R40 + help + This enables common clock driver support for platforms based + on Allwinner R40 SoC. + config CLK_SUN8I_H3 bool "Clock driver for Allwinner H3/H5" default MACH_SUNXI_H3_H5
drivers/clk/sunxi/Makefile +1 -0
@@ -11,5 +11,6 @@ obj-$(CONFIG_CLK_SUN5I_A10S) += clk_a10s.o obj-$(CONFIG_CLK_SUN6I_A31) += clk_a31.o obj-$(CONFIG_CLK_SUN8I_A23) += clk_a23.o obj-$(CONFIG_CLK_SUN8I_A83T) += clk_a83t.o +obj-$(CONFIG_CLK_SUN8I_R40) += clk_r40.o obj-$(CONFIG_CLK_SUN8I_H3) += clk_h3.o obj-$(CONFIG_CLK_SUN50I_A64) += clk_a64.o
drivers/clk/sunxi/clk_r40.c new file +89 -0
89 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 13/42 clk: sunxi: Add Allwinner V3S CLK driver
In reply to Jagan TekiAdd initial clock driver for Allwinner V3S.
- Implement USB bus and USB clocks via ccu_clk_map descriptor for V3S, so it can accessed in common clk enable and disable functions from clk_sunxi.c
- Implement USB bus and USB resets via ccu_reset_map descriptor for V3S, so it can accessed in common reset deassert and assert functions from reset-sunxi.c
--- drivers/clk/sunxi/Kconfig | 7 ++++ drivers/clk/sunxi/Makefile | 1 + drivers/clk/sunxi/clk_v3s.c | 69 +++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 drivers/clk/sunxi/clk_v3s.c
drivers/clk/sunxi/Kconfig +7 -0
@@ -51,6 +51,13 @@ config CLK_SUN8I_R40 This enables common clock driver support for platforms based on Allwinner R40 SoC. +config CLK_SUN8I_V3S + bool "Clock driver for Allwinner V3S" + default MACH_SUN8I_V3S + help + This enables common clock driver support for platforms based + on Allwinner V3S SoC. + config CLK_SUN8I_H3 bool "Clock driver for Allwinner H3/H5" default MACH_SUNXI_H3_H5
drivers/clk/sunxi/Makefile +1 -0
@@ -12,5 +12,6 @@ obj-$(CONFIG_CLK_SUN6I_A31) += clk_a31.o obj-$(CONFIG_CLK_SUN8I_A23) += clk_a23.o obj-$(CONFIG_CLK_SUN8I_A83T) += clk_a83t.o obj-$(CONFIG_CLK_SUN8I_R40) += clk_r40.o +obj-$(CONFIG_CLK_SUN8I_V3S) += clk_v3s.o obj-$(CONFIG_CLK_SUN8I_H3) += clk_h3.o obj-$(CONFIG_CLK_SUN50I_A64) += clk_a64.o
drivers/clk/sunxi/clk_v3s.c new file +69 -0
69 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 14/42 sunxi: Enable CLK
In reply to Jagan TekiCLK and DM_RESET drivers are now available for most of the Allwinner platforms, so enable in mach-sunxi/Kconfig
Enabling CLK will select DM_RESET by default.
--- arch/arm/mach-sunxi/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/mach-sunxi/Kconfig +12 -0
@@ -132,6 +132,7 @@ endif config MACH_SUNXI_H3_H5 bool + select CLK select DM_I2C select PHY_SUN4I_USB select SUNXI_DE2
@@ -147,6 +148,7 @@ choice config MACH_SUN4I bool "sun4i (Allwinner A10)" select CPU_V7A + select CLK select ARM_CORTEX_CPU_IS_UP select DM_MMC if MMC select DM_SCSI if SCSI
@@ -158,6 +160,7 @@ config MACH_SUN4I config MACH_SUN5I bool "sun5i (Allwinner A13)" select CPU_V7A + select CLK select ARM_CORTEX_CPU_IS_UP select DRAM_SUN4I select PHY_SUN4I_USB
@@ -171,6 +174,7 @@ config MACH_SUN6I select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select CLK select DRAM_SUN6I select PHY_SUN4I_USB select SUN6I_P2WI
@@ -185,6 +189,7 @@ config MACH_SUN7I select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select CLK select DRAM_SUN4I select PHY_SUN4I_USB select SUNXI_GEN_SUN4I
@@ -197,6 +202,7 @@ config MACH_SUN8I_A23 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select CLK select DRAM_SUN8I_A23 select PHY_SUN4I_USB select SUNXI_GEN_SUN6I
@@ -210,6 +216,7 @@ config MACH_SUN8I_A33 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select CLK select DRAM_SUN8I_A33 select PHY_SUN4I_USB select SUNXI_GEN_SUN6I
@@ -220,6 +227,7 @@ config MACH_SUN8I_A33 config MACH_SUN8I_A83T bool "sun8i (Allwinner A83T)" select CPU_V7A + select CLK select DRAM_SUN8I_A83T select PHY_SUN4I_USB select SUNXI_GEN_SUN6I
@@ -231,6 +239,7 @@ config MACH_SUN8I_H3 select CPU_V7A select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT + select CLK select ARCH_SUPPORT_PSCI select MACH_SUNXI_H3_H5 select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
@@ -241,6 +250,7 @@ config MACH_SUN8I_R40 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select CLK select SUNXI_GEN_SUN6I select SUPPORT_SPL select SUNXI_DRAM_DW
@@ -252,6 +262,7 @@ config MACH_SUN8I_V3S select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select CLK select SUNXI_GEN_SUN6I select SUNXI_DRAM_DW select SUNXI_DRAM_DW_16BIT
@@ -270,6 +281,7 @@ config MACH_SUN9I config MACH_SUN50I bool "sun50i (Allwinner A64)" select ARM64 + select CLK select DM_I2C select PHY_SUN4I_USB select SUNXI_DE2
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 15/42 musb-new: sunxi: Use CLK and RESET support
In reply to Jagan TekiNow clock and reset drivers are available for respective SoC's so use clk and reset ops on musb driver.
--- drivers/usb/musb-new/sunxi.c | 82 +++++++++++++++++++++++------------- 1 file changed, 53 insertions(+), 29 deletions(-)
drivers/usb/musb-new/sunxi.c +53 -29
@@ -16,9 +16,11 @@* This file is part of the Inventra Controller Driver for Linux. */ #include <common.h> +#include <clk.h> #include <dm.h> #include <generic-phy.h> #include <phy-sun4i-usb.h> +#include <reset.h> #include <asm/arch/cpu.h> #include <asm/arch/clock.h> #include <asm/arch/gpio.h>
@@ -78,16 +80,15 @@struct sunxi_musb_config {struct musb_hdrc_config *config; -u8 rst_bit; -u8 clkgate_bit; };struct sunxi_glue {struct musb_host_data mdata; -struct sunxi_ccm_reg *ccm;struct sunxi_musb_config *cfg;struct device dev;struct phy phy; +struct clk clocks; +struct reset_ctl resets; };#define to_sunxi_glue (d) container_of(d, struct sunxi_glue, dev)
@@ -291,6 +292,18 @@ static int sunxi_musb_init(struct musb *musb)pr_debug ("%s():\n" , __func__); + ret =clk_enable (&glue->clocks); +if (ret) { +dev_err (dev,"failed to enable clock\n" ); +return ret; + } + + ret =reset_deassert (&glue->resets); +if (ret) { +dev_err (dev,"failed to deassert reset\n" ); +return ret; + } + ret =generic_phy_init (&glue->phy);if (ret) {pr_err ("failed to init USB PHY\n" );
@@ -299,17 +312,6 @@ static int sunxi_musb_init(struct musb *musb) musb->isr = sunxi_musb_interrupt; -setbits_le32 (&glue->ccm->ahb_gate0,BIT (AHB_GATE_OFFSET_USB0 )); -if (glue->cfg->clkgate_bit) -setbits_le32 (&glue->ccm->ahb_gate0, -BIT (glue->cfg->clkgate_bit)); -#ifdef CONFIG_SUNXI_GEN_SUN6I -setbits_le32 (&glue->ccm->ahb_reset0_cfg,BIT (AHB_GATE_OFFSET_USB0 )); -if (glue->cfg->rst_bit) -setbits_le32 (&glue->ccm->ahb_reset0_cfg, -BIT (glue->cfg->rst_bit)); -#endif -USBC_ConfigFIFO_Base ();USBC_EnableDpDmPullUp (musb->mregs);USBC_EnableIdPullUp (musb->mregs);
@@ -339,16 +341,17 @@ static int sunxi_musb_exit(struct musb *musb) } } -#ifdef CONFIG_SUNXI_GEN_SUN6I -clrbits_le32 (&glue->ccm->ahb_reset0_cfg,BIT (AHB_GATE_OFFSET_USB0 )); -if (glue->cfg->rst_bit) -clrbits_le32 (&glue->ccm->ahb_reset0_cfg, -BIT (glue->cfg->rst_bit)); -#endif -clrbits_le32 (&glue->ccm->ahb_gate0,BIT (AHB_GATE_OFFSET_USB0 )); -if (glue->cfg->clkgate_bit) -clrbits_le32 (&glue->ccm->ahb_gate0, -BIT (glue->cfg->clkgate_bit)); + ret =reset_assert (&glue->resets); +if (ret) { +dev_err (dev,"failed to deassert reset\n" ); +return ret; + } + + ret =clk_disable (&glue->clocks); +if (ret) { +dev_err (dev,"failed to enable clock\n" ); +return ret; + }return 0 ; }
@@ -433,6 +436,7 @@ static int musb_usb_probe(struct udevice *dev)struct usb_bus_priv *priv =dev_get_uclass_priv (dev);struct musb_hdrc_platform_data pdata;void *base =dev_read_addr_ptr (dev); +int clock_nb, reset_nb;int ret;if (!base)
@@ -442,9 +446,31 @@ static int musb_usb_probe(struct udevice *dev)if (!glue->cfg)return -EINVAL ; - glue->ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE ; -if (IS_ERR (glue->ccm)) -return PTR_ERR (glue->ccm); + clock_nb =ofnode_count_phandle_with_args (dev_ofnode (dev),"clocks" , +"#clock-cells" ); +if (clock_nb <0 ) { +dev_err (dev,"failed to get clock phandle(%d)\n" , clock_nb); +return clock_nb; + } + + ret =clk_get_by_index (dev,0 , &glue->clocks); +if (ret) { +dev_err (dev,"failed to get clock 0\n" ); +clk_free (&glue->clocks); + } + + reset_nb =ofnode_count_phandle_with_args (dev_ofnode (dev),"resets" , +"#reset-cells" ); +if (reset_nb <0 ) { +dev_err (dev,"failed to get reset phandle(%d)\n" , clock_nb); +return reset_nb; + } + + ret =reset_get_by_index (dev,0 , &glue->resets); +if (ret) { +dev_err (dev,"failed to get reset 0\n" ); +reset_free (&glue->resets); + } ret =generic_phy_get_by_name (dev,"usb" , &glue->phy);if (ret) {
@@ -499,8 +525,6 @@ static const struct sunxi_musb_config sun4i_a10_cfg = {static const struct sunxi_musb_config sun8i_h3_cfg = { .config = &musb_config_h3, - .rst_bit =23 , - .clkgate_bit =23 , };static const struct udevice_id sunxi_musb_ids[] = {
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 16/42 phy: sun4i-usb: Use CLK and RESET support
In reply to Jagan TekiNow clock and reset drivers are available for respective SoC's so use clk and reset ops on phy driver.
--- drivers/phy/allwinner/phy-sun4i-usb.c | 77 ++++++++++++++++++++------- 1 file changed, 57 insertions(+), 20 deletions(-)
drivers/phy/allwinner/phy-sun4i-usb.c +57 -20
@@ -11,10 +11,12 @@*/ #include <common.h> +#include <clk.h> #include <dm.h> #include <dm/device.h> #include <generic-phy.h> #include <phy-sun4i-usb.h> +#include <reset.h> #include <asm/gpio.h> #include <asm/io.h> #include <asm/arch/clock.h>
@@ -80,6 +82,7 @@ struct sun4i_usb_phy_cfg {enum sun4i_usb_phy_type type;u32 disc_thresh;u8 phyctl_offset; +bool dedicated_clocks;bool enable_pmu_unk1;bool phy0_dual_route; };
@@ -88,30 +91,21 @@ struct sun4i_usb_phy_info {const char *gpio_vbus;const char *gpio_vbus_det;const char *gpio_id_det; -int rst_mask; } phy_info[] = { { .gpio_vbus = CONFIG_USB0_VBUS_PIN, .gpio_vbus_det = CONFIG_USB0_VBUS_DET, .gpio_id_det = CONFIG_USB0_ID_DET, - .rst_mask = (CCM_USB_CTRL_PHY0_RST | CCM_USB_CTRL_PHY0_CLK), }, { .gpio_vbus = CONFIG_USB1_VBUS_PIN, .gpio_vbus_det = NULL, .gpio_id_det = NULL, - .rst_mask = (CCM_USB_CTRL_PHY1_RST | CCM_USB_CTRL_PHY1_CLK), }, { .gpio_vbus = CONFIG_USB2_VBUS_PIN, .gpio_vbus_det = NULL, .gpio_id_det = NULL, -#ifdef CONFIG_MACH_SUN8I_A83T - .rst_mask = (CCM_USB_CTRL_HSIC_RST | CCM_USB_CTRL_HSIC_CLK | - CCM_USB_CTRL_12M_CLK), -#else - .rst_mask = (CCM_USB_CTRL_PHY2_RST | CCM_USB_CTRL_PHY2_CLK), -#endif }, { .gpio_vbus = CONFIG_USB3_VBUS_PIN,
@@ -126,13 +120,13 @@ struct sun4i_usb_phy_plat {int gpio_vbus;int gpio_vbus_det;int gpio_id_det; -int rst_mask; +struct clk clocks; +struct reset_ctl resets;int id; };struct sun4i_usb_phy_data {void __iomem *base; -struct sunxi_ccm_reg *ccm;const struct sun4i_usb_phy_cfg *cfg;struct sun4i_usb_phy_plat *usb_phy; };
@@ -266,8 +260,19 @@ static int sun4i_usb_phy_init(struct phy *phy)struct sun4i_usb_phy_data *data =dev_get_priv (phy->dev);struct sun4i_usb_phy_plat *usb_phy = &data->usb_phy[phy->id];u32 val; +int ret; -setbits_le32 (&data->ccm->usb_clk_cfg, usb_phy->rst_mask); + ret =clk_enable (&usb_phy->clocks); +if (ret) { +dev_err (dev,"failed to enable usb_%ldphy clock\n" , phy->id); +return ret; + } + + ret =reset_deassert (&usb_phy->resets); +if (ret) { +dev_err (dev,"failed to deassert usb_%ldreset reset\n" , phy->id); +return ret; + }if (data->cfg->type == sun8i_a83t_phy) {if (phy->id ==0 ) {
@@ -308,6 +313,7 @@ static int sun4i_usb_phy_exit(struct phy *phy) {struct sun4i_usb_phy_data *data =dev_get_priv (phy->dev);struct sun4i_usb_phy_plat *usb_phy = &data->usb_phy[phy->id]; +int ret;if (phy->id ==0 ) {if (data->cfg->type == sun8i_a83t_phy) {
@@ -320,7 +326,17 @@ static int sun4i_usb_phy_exit(struct phy *phy)sun4i_usb_phy_passby (phy, false); -clrbits_le32 (&data->ccm->usb_clk_cfg, usb_phy->rst_mask); + ret =clk_disable (&usb_phy->clocks); +if (ret) { +dev_err (dev,"failed to disable usb_%ldphy clock\n" , phy->id); +return ret; + } + + ret =reset_assert (&usb_phy->resets); +if (ret) { +dev_err (dev,"failed to assert usb_%ldreset reset\n" , phy->id); +return ret; + }return 0 ; }
@@ -407,10 +423,6 @@ static int sun4i_usb_phy_probe(struct udevice *dev)if (IS_ERR (data->base))return PTR_ERR (data->base); - data->ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE ; -if (IS_ERR (data->ccm)) -return PTR_ERR (data->ccm); - data->usb_phy = plat;for (i =0 ; i < data->cfg->num_phys; i++) {struct sun4i_usb_phy_plat *phy = &plat[i];
@@ -448,6 +460,24 @@ static int sun4i_usb_phy_probe(struct udevice *dev)sunxi_gpio_set_pull (phy->gpio_id_det,SUNXI_GPIO_PULL_UP ); } +if (data->cfg->dedicated_clocks) +snprintf (name,sizeof (name),"usb%d_phy" , i); +else +strlcpy (name,"usb_phy" ,sizeof (name)); + + ret =clk_get_by_name (dev, name, &phy->clocks); +if (ret) { +dev_err (dev,"failed to get usb%d_phy clock phandle\n" , i); +return ret; + } + +snprintf (name,sizeof (name),"usb%d_reset" , i); + ret =reset_get_by_name (dev, name, &phy->resets); +if (ret) { +dev_err (dev,"failed to get usb%d_reset reset phandle\n" , i); +return ret; + } +if (i || data->cfg->phy0_dual_route) {snprintf (name,sizeof (name),"pmu%d" , i); phy->pmu = (void __iomem *)devfdt_get_addr_name (dev, name);
@@ -456,9 +486,6 @@ static int sun4i_usb_phy_probe(struct udevice *dev) } phy->id = i; - phy->rst_mask = info->rst_mask; -if ((data->cfg->type == sun8i_h3_phy) && (phy->id ==3 )) - phy->rst_mask = (BIT (3 ) |BIT (11 )); };debug ("Allwinner Sun4I USB PHY driver loaded\n" );
@@ -470,6 +497,7 @@ static const struct sun4i_usb_phy_cfg sun4i_a10_cfg = { .type = sun4i_a10_phy, .disc_thresh = 3, .phyctl_offset = REG_PHYCTL_A10, + .dedicated_clocks = false, .enable_pmu_unk1 = false, };
@@ -478,6 +506,7 @@ static const struct sun4i_usb_phy_cfg sun5i_a13_cfg = { .type = sun4i_a10_phy, .disc_thresh = 2, .phyctl_offset = REG_PHYCTL_A10, + .dedicated_clocks = false, .enable_pmu_unk1 = false, };
@@ -486,6 +515,7 @@ static const struct sun4i_usb_phy_cfg sun6i_a31_cfg = { .type = sun6i_a31_phy, .disc_thresh = 3, .phyctl_offset = REG_PHYCTL_A10, + .dedicated_clocks = true, .enable_pmu_unk1 = false, };
@@ -494,6 +524,7 @@ static const struct sun4i_usb_phy_cfg sun7i_a20_cfg = { .type = sun4i_a10_phy, .disc_thresh = 2, .phyctl_offset = REG_PHYCTL_A10, + .dedicated_clocks = false, .enable_pmu_unk1 = false, };
@@ -502,6 +533,7 @@ static const struct sun4i_usb_phy_cfg sun8i_a23_cfg = { .type = sun4i_a10_phy, .disc_thresh = 3, .phyctl_offset = REG_PHYCTL_A10, + .dedicated_clocks = true, .enable_pmu_unk1 = false, };
@@ -510,6 +542,7 @@ static const struct sun4i_usb_phy_cfg sun8i_a33_cfg = { .type = sun8i_a33_phy, .disc_thresh = 3, .phyctl_offset = REG_PHYCTL_A33, + .dedicated_clocks = true, .enable_pmu_unk1 = false, };
@@ -517,6 +550,7 @@ static const struct sun4i_usb_phy_cfg sun8i_a83t_cfg = { .num_phys = 3, .type = sun8i_a83t_phy, .phyctl_offset = REG_PHYCTL_A33, + .dedicated_clocks = true, };static const struct sun4i_usb_phy_cfg sun8i_h3_cfg = {
@@ -524,6 +558,7 @@ static const struct sun4i_usb_phy_cfg sun8i_h3_cfg = { .type = sun8i_h3_phy, .disc_thresh = 3, .phyctl_offset = REG_PHYCTL_A33, + .dedicated_clocks = true, .enable_pmu_unk1 = true, .phy0_dual_route = true, };
@@ -533,6 +568,7 @@ static const struct sun4i_usb_phy_cfg sun8i_v3s_cfg = { .type = sun8i_v3s_phy, .disc_thresh = 3, .phyctl_offset = REG_PHYCTL_A33, + .dedicated_clocks = true, .enable_pmu_unk1 = true, .phy0_dual_route = true, };
@@ -542,6 +578,7 @@ static const struct sun4i_usb_phy_cfg sun50i_a64_cfg = { .type = sun50i_a64_phy, .disc_thresh = 3, .phyctl_offset = REG_PHYCTL_A33, + .dedicated_clocks = true, .enable_pmu_unk1 = true, .phy0_dual_route = true, };
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 17/42 sunxi: usb: Switch to Generic host controllers
In reply to Jagan TekiOnce of key blocker for using USB Generic host controller drivers in Allwinner are CLK and RESET drivers, now these available for USB usage. So switch to use EHCI and OHCI Generic controllers.
Enabling USB is wisely a board choise, so Enable USB_OHCI_HCD where it already have USB_EHCI_HCD
--- configs/A10-OLinuXino-Lime_defconfig | 1 + configs/A10s-OLinuXino-M_defconfig | 1 + configs/A13-OLinuXinoM_defconfig | 1 + configs/A13-OLinuXino_defconfig | 1 + configs/A20-OLinuXino-Lime2-eMMC_defconfig | 1 + configs/A20-OLinuXino-Lime2_defconfig | 1 + configs/A20-OLinuXino-Lime_defconfig | 1 + configs/A20-Olimex-SOM204-EVB_defconfig | 2 ++ configs/Auxtek-T003_defconfig | 1 + configs/Auxtek-T004_defconfig | 1 + configs/Bananapi_defconfig | 1 + configs/Bananapi_m2m_defconfig | 1 + configs/Bananapro_defconfig | 1 + configs/CHIP_defconfig | 1 + configs/CHIP_pro_defconfig | 1 + configs/CSQ_CS908_defconfig | 1 + configs/Colombus_defconfig | 1 + configs/Cubieboard2_defconfig | 1 + configs/Cubieboard_defconfig | 1 + configs/Cubietruck_plus_defconfig | 1 + configs/Hummingbird_A31_defconfig | 1 + configs/Itead_Ibox_A20_defconfig | 1 + configs/Linksprite_pcDuino3_Nano_defconfig | 1 + configs/Linksprite_pcDuino3_defconfig | 1 + configs/Linksprite_pcDuino_defconfig | 1 + configs/MK808C_defconfig | 1 + configs/Marsboard_A10_defconfig | 1 + configs/Mele_A1000G_quad_defconfig | 1 + configs/Mele_A1000_defconfig | 1 + configs/Mele_I7_defconfig | 1 + configs/Mele_M3_defconfig | 1 + configs/Mele_M5_defconfig | 1 + configs/Mele_M9_defconfig | 1 + configs/Mini-X_defconfig | 1 + configs/Orangepi_defconfig | 1 + configs/Orangepi_mini_defconfig | 1 + configs/Sinlinx_SinA31s_defconfig | 1 + configs/Sinlinx_SinA33_defconfig | 1 + configs/Sinovoip_BPI_M2_Plus_defconfig | 1 + configs/Sinovoip_BPI_M2_defconfig | 1 + configs/Sinovoip_BPI_M3_defconfig | 1 + configs/Wexler_TAB7200_defconfig | 1 + configs/Wobo_i5_defconfig | 1 + configs/a64-olinuxino_defconfig | 1 + configs/ba10_tv_box_defconfig | 1 + configs/bananapi_m1_plus_defconfig | 1 + configs/bananapi_m64_defconfig | 1 + configs/ga10h_v1_1_defconfig | 1 + configs/h8_homlet_v2_defconfig | 1 + configs/i12-tvbox_defconfig | 1 + configs/icnova-a20-swac_defconfig | 1 + configs/inet1_defconfig | 1 + configs/inet_q972_defconfig | 1 + configs/jesurun_q5_defconfig | 1 + configs/libretech_all_h3_cc_h2_plus_defconfig | 1 + configs/libretech_all_h3_cc_h3_defconfig | 1 + configs/libretech_all_h3_cc_h5_defconfig | 1 + configs/mixtile_loftq_defconfig | 1 + configs/mk802_a10s_defconfig | 1 + configs/mk802_defconfig | 1 + configs/mk802ii_defconfig | 1 + configs/nanopi_a64_defconfig | 1 + configs/nanopi_m1_defconfig | 1 + configs/nanopi_m1_plus_defconfig | 1 + configs/nanopi_neo2_defconfig | 1 + configs/nanopi_neo_air_defconfig | 1 + configs/nanopi_neo_defconfig | 1 + configs/nanopi_neo_plus2_defconfig | 1 + configs/orangepi_2_defconfig | 1 + configs/orangepi_lite_defconfig | 1 + configs/orangepi_one_defconfig | 1 + configs/orangepi_pc2_defconfig | 1 + configs/orangepi_pc_defconfig | 1 + configs/orangepi_pc_plus_defconfig | 1 + configs/orangepi_plus2e_defconfig | 1 + configs/orangepi_plus_defconfig | 1 + configs/orangepi_prime_defconfig | 1 + configs/orangepi_r1_defconfig | 1 + configs/orangepi_win_defconfig | 1 + configs/orangepi_zero_defconfig | 1 + configs/orangepi_zero_plus2_defconfig | 1 + configs/orangepi_zero_plus_defconfig | 1 + configs/parrot_r16_defconfig | 1 + configs/pine64_plus_defconfig | 1 + configs/r7-tv-dongle_defconfig | 1 + configs/sopine_baseboard_defconfig | 1 + configs/sun8i_a23_evb_defconfig | 1 + configs/sunxi_Gemei_G9_defconfig | 1 + configs/tbs_a711_defconfig | 1 + drivers/usb/host/Kconfig | 2 ++ include/configs/sun4i.h | 4 ---- include/configs/sun50i.h | 5 ----- include/configs/sun5i.h | 4 ---- include/configs/sun6i.h | 4 ---- include/configs/sun7i.h | 4 ---- include/configs/sun8i.h | 4 ---- include/configs/sunxi-common.h | 1 - 97 files changed, 92 insertions(+), 26 deletions(-)
configs/A10-OLinuXino-Lime_defconfig +1 -0
@@ -20,5 +20,6 @@ CONFIG_SUN4I_EMAC=y CONFIG_AXP_ALDO3_VOLT=2800 CONFIG_AXP_ALDO4_VOLT=2800 CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A10s-OLinuXino-M_defconfig +1 -0
@@ -16,5 +16,6 @@ CONFIG_SPL_I2C_SUPPORT=y CONFIG_SUN4I_EMAC=y CONFIG_AXP152_POWER=y CONFIG_CONS_INDEX=2 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A13-OLinuXinoM_defconfig +1 -0
@@ -18,5 +18,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino-micro" # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUNXI_NO_PMIC=y CONFIG_CONS_INDEX=2 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A13-OLinuXino_defconfig +1 -0
@@ -25,6 +25,7 @@ CONFIG_DFU_RAM=y CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_AXP_ALDO3_VOLT=3300 CONFIG_CONS_INDEX=2 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A20-OLinuXino-Lime2-eMMC_defconfig +1 -0
@@ -27,6 +27,7 @@ CONFIG_SUN7I_GMAC=y CONFIG_AXP_ALDO3_VOLT=2800 CONFIG_AXP_ALDO4_VOLT=2800 CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A20-OLinuXino-Lime2_defconfig +1 -0
@@ -26,6 +26,7 @@ CONFIG_SUN7I_GMAC=y CONFIG_AXP_ALDO3_VOLT=2800 CONFIG_AXP_ALDO4_VOLT=2800 CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A20-OLinuXino-Lime_defconfig +1 -0
@@ -19,5 +19,6 @@ CONFIG_SUN7I_GMAC=y CONFIG_AXP_ALDO3_VOLT=2800 CONFIG_AXP_ALDO4_VOLT=2800 CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A20-Olimex-SOM204-EVB_defconfig +2 -0
@@ -1,4 +1,5 @@ CONFIG_ARM=y +CONFIG_USB_OHCI_HCD=y CONFIG_ARCH_SUNXI=y CONFIG_SPL=y CONFIG_MACH_SUN7I=y
@@ -27,6 +28,7 @@ CONFIG_SUN7I_GMAC=y CONFIG_AXP_ALDO3_VOLT=2800 CONFIG_AXP_ALDO4_VOLT=2800 CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Auxtek-T003_defconfig +1 -0
@@ -14,5 +14,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_AXP152_POWER=y CONFIG_CONS_INDEX=2 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Auxtek-T004_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_AXP152_POWER=y CONFIG_CONS_INDEX=2 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Bananapi_defconfig +1 -0
@@ -19,5 +19,6 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_RGMII=y CONFIG_SUN7I_GMAC=y CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Bananapi_m2m_defconfig +1 -0
@@ -14,6 +14,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-r16-bananapi-m2m" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_PARTITION_UUIDS is not set CONFIG_FASTBOOT_CMD_OEM_FORMAT=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_USB_FUNCTION_MASS_STORAGE=y
configs/Bananapro_defconfig +1 -0
@@ -22,5 +22,6 @@ CONFIG_RGMII=y CONFIG_SUN7I_GMAC=y CONFIG_AXP_ALDO4_VOLT=2500 CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/CHIP_defconfig +1 -0
@@ -16,6 +16,7 @@ CONFIG_DFU_RAM=y CONFIG_AXP_ALDO3_VOLT=3300 CONFIG_AXP_ALDO4_VOLT=3300 CONFIG_CONS_INDEX=2 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/CHIP_pro_defconfig +1 -0
@@ -20,6 +20,7 @@ CONFIG_SYS_NAND_OOBSIZE=0x100 CONFIG_AXP_ALDO3_VOLT=3300 CONFIG_AXP_ALDO4_VOLT=3300 CONFIG_CONS_INDEX=2 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/CSQ_CS908_defconfig +1 -0
@@ -14,6 +14,7 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_SUN7I_GMAC=y CONFIG_AXP_ALDO1_VOLT=3300 CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Colombus_defconfig +1 -0
@@ -24,5 +24,6 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_RGMII=y CONFIG_SUN7I_GMAC=y CONFIG_AXP_ALDO1_VOLT=3300 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Cubieboard2_defconfig +1 -0
@@ -16,5 +16,6 @@ CONFIG_SCSI_AHCI=y CONFIG_ETH_DESIGNWARE=y CONFIG_SUN7I_GMAC=y CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Cubieboard_defconfig +1 -0
@@ -15,5 +15,6 @@ CONFIG_SPL_I2C_SUPPORT=y CONFIG_SCSI_AHCI=y CONFIG_SUN4I_EMAC=y CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Cubietruck_plus_defconfig +1 -0
@@ -22,6 +22,7 @@ CONFIG_CONSOLE_MUX=y CONFIG_AXP_DLDO3_VOLT=2500 CONFIG_AXP_DLDO4_VOLT=3300 CONFIG_AXP_FLDO1_VOLT=1200 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Hummingbird_A31_defconfig +1 -0
@@ -16,5 +16,6 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_RGMII=y CONFIG_SUN7I_GMAC=y CONFIG_AXP_ALDO1_VOLT=3300 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Itead_Ibox_A20_defconfig +1 -0
@@ -16,5 +16,6 @@ CONFIG_SCSI_AHCI=y CONFIG_ETH_DESIGNWARE=y CONFIG_SUN7I_GMAC=y CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Linksprite_pcDuino3_Nano_defconfig +1 -0
@@ -19,5 +19,6 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_RGMII=y CONFIG_SUN7I_GMAC=y CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Linksprite_pcDuino3_defconfig +1 -0
@@ -18,5 +18,6 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_SUN7I_GMAC=y CONFIG_SCSI=y CONFIG_DM_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Linksprite_pcDuino_defconfig +1 -0
@@ -11,5 +11,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN4I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/MK808C_defconfig +1 -0
@@ -9,5 +9,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_CMD_FLASH is not set # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Marsboard_A10_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_SCSI_AHCI=y CONFIG_SUN4I_EMAC=y CONFIG_SUNXI_NO_PMIC=y CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mele_A1000G_quad_defconfig +1 -0
@@ -17,6 +17,7 @@ CONFIG_AXP_DCDC1_VOLT=3300 CONFIG_AXP_ALDO1_VOLT=3300 CONFIG_AXP_DLDO1_VOLT=3300 CONFIG_AXP_DLDO4_VOLT=3300 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mele_A1000_defconfig +1 -0
@@ -15,5 +15,6 @@ CONFIG_SPL_I2C_SUPPORT=y CONFIG_SCSI_AHCI=y CONFIG_SUN4I_EMAC=y CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mele_I7_defconfig +1 -0
@@ -16,5 +16,6 @@ CONFIG_AXP_DCDC1_VOLT=3300 CONFIG_AXP_ALDO1_VOLT=3300 CONFIG_AXP_DLDO1_VOLT=3300 CONFIG_AXP_DLDO4_VOLT=3300 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mele_M3_defconfig +1 -0
@@ -15,5 +15,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_ETH_DESIGNWARE=y CONFIG_SUN7I_GMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mele_M5_defconfig +1 -0
@@ -17,5 +17,6 @@ CONFIG_SCSI_AHCI=y CONFIG_ETH_DESIGNWARE=y CONFIG_SUN7I_GMAC=y CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mele_M9_defconfig +1 -0
@@ -16,5 +16,6 @@ CONFIG_AXP_DCDC1_VOLT=3300 CONFIG_AXP_ALDO1_VOLT=3300 CONFIG_AXP_DLDO1_VOLT=3300 CONFIG_AXP_DLDO4_VOLT=3300 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mini-X_defconfig +1 -0
@@ -10,6 +10,7 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_CMD_FLASH is not set # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Orangepi_defconfig +1 -0
@@ -21,5 +21,6 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_RGMII=y CONFIG_SUN7I_GMAC=y CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Orangepi_mini_defconfig +1 -0
@@ -23,5 +23,6 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_RGMII=y CONFIG_SUN7I_GMAC=y CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Sinlinx_SinA31s_defconfig +1 -0
@@ -17,5 +17,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-sina31s" CONFIG_ETH_DESIGNWARE=y CONFIG_SUN7I_GMAC=y CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Sinlinx_SinA33_defconfig +1 -0
@@ -19,6 +19,7 @@ CONFIG_CMD_DFU=y # CONFIG_SPL_PARTITION_UUIDS is not set CONFIG_DFU_RAM=y CONFIG_FASTBOOT_CMD_OEM_FORMAT=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Sinovoip_BPI_M2_Plus_defconfig +1 -0
@@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-bananapi-m2-plus" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Sinovoip_BPI_M2_defconfig +1 -0
@@ -16,5 +16,6 @@ CONFIG_SUN7I_GMAC=y CONFIG_AXP_ALDO1_VOLT=3300 CONFIG_AXP_ALDO2_VOLT=1800 CONFIG_AXP_DLDO1_VOLT=3000 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Sinovoip_BPI_M3_defconfig +1 -0
@@ -23,6 +23,7 @@ CONFIG_CONSOLE_MUX=y CONFIG_AXP_DCDC5_VOLT=1200 CONFIG_AXP_DLDO3_VOLT=2500 CONFIG_AXP_SW_ON=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Wexler_TAB7200_defconfig +1 -0
@@ -17,6 +17,7 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_CMD_FLASH is not set # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Wobo_i5_defconfig +1 -0
@@ -14,5 +14,6 @@ CONFIG_SPL_I2C_SUPPORT=y CONFIG_AXP_ALDO3_VOLT=3300 CONFIG_AXP_ALDO4_VOLT=3300 CONFIG_CONS_INDEX=2 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/a64-olinuxino_defconfig +1 -0
@@ -10,5 +10,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-olinuxino" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/ba10_tv_box_defconfig +1 -0
@@ -14,6 +14,7 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN4I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/bananapi_m1_plus_defconfig +1 -0
@@ -19,4 +19,5 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_RGMII=y CONFIG_SUN7I_GMAC=y CONFIG_SCSI=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y
configs/bananapi_m64_defconfig +1 -0
@@ -11,6 +11,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-bananapi-m64" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/ga10h_v1_1_defconfig +1 -0
@@ -22,6 +22,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-ga10h-v1.1" # CONFIG_SPL_EFI_PARTITION is not set CONFIG_AXP_DLDO1_VOLT=3300 CONFIG_CONS_INDEX=5 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/h8_homlet_v2_defconfig +1 -0
@@ -15,6 +15,7 @@ CONFIG_CONSOLE_MUX=y # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_AXP_DLDO4_VOLT=3300 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/i12-tvbox_defconfig +1 -0
@@ -13,5 +13,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_ETH_DESIGNWARE=y CONFIG_SUN7I_GMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/icnova-a20-swac_defconfig +1 -0
@@ -20,5 +20,6 @@ CONFIG_CMD_UNZIP=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_ETH_DESIGNWARE=y CONFIG_SUN7I_GMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/inet1_defconfig +1 -0
@@ -18,6 +18,7 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_CMD_FLASH is not set # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/inet_q972_defconfig +1 -0
@@ -19,6 +19,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-inet-q972" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/jesurun_q5_defconfig +1 -0
@@ -13,6 +13,7 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN4I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_HOST=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/libretech_all_h3_cc_h2_plus_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-libretech-all-h3-cc" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/libretech_all_h3_cc_h3_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-libretech-all-h3-cc" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/libretech_all_h3_cc_h5_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-libretech-all-h3-cc" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/mixtile_loftq_defconfig +1 -0
@@ -16,5 +16,6 @@ CONFIG_ETH_DESIGNWARE=y CONFIG_RGMII=y CONFIG_SUN7I_GMAC=y CONFIG_AXP_ALDO1_VOLT=3300 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/mk802_a10s_defconfig +1 -0
@@ -13,5 +13,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_AXP152_POWER=y CONFIG_CONS_INDEX=2 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/mk802_defconfig +1 -0
@@ -9,5 +9,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mk802" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUNXI_NO_PMIC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/mk802ii_defconfig +1 -0
@@ -8,5 +8,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_CMD_FLASH is not set # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/nanopi_a64_defconfig +1 -0
@@ -9,5 +9,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-nanopi-a64" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/nanopi_m1_defconfig +1 -0
@@ -10,5 +10,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-m1" # CONFIG_CMD_FLASH is not set # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/nanopi_m1_plus_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-m1-plus" # CONFIG_CMD_FLASH is not set # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/nanopi_neo2_defconfig +1 -0
@@ -10,5 +10,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-neo2" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/nanopi_neo_air_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_CONSOLE_MUX=y # CONFIG_CMD_FLASH is not set # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/nanopi_neo_defconfig +1 -0
@@ -13,5 +13,6 @@ CONFIG_CONSOLE_MUX=y # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/nanopi_neo_plus2_defconfig +1 -0
@@ -12,4 +12,5 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-neo-plus2" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y
configs/orangepi_2_defconfig +1 -0
@@ -15,5 +15,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y CONFIG_SY8106A_POWER=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_lite_defconfig +1 -0
@@ -10,5 +10,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-lite" # CONFIG_CMD_FLASH is not set # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_one_defconfig +1 -0
@@ -11,5 +11,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-one" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_pc2_defconfig +1 -0
@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-pc2" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_pc_defconfig +1 -0
@@ -13,5 +13,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y CONFIG_SY8106A_POWER=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_pc_plus_defconfig +1 -0
@@ -14,5 +14,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y CONFIG_SY8106A_POWER=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_plus2e_defconfig +1 -0
@@ -15,5 +15,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y CONFIG_SY8106A_POWER=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_plus_defconfig +1 -0
@@ -17,5 +17,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y CONFIG_SY8106A_POWER=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_prime_defconfig +1 -0
@@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-prime" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_r1_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-orangepi-r1" CONFIG_CONSOLE_MUX=y # CONFIG_CMD_FLASH is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_win_defconfig +1 -0
@@ -10,5 +10,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-orangepi-win" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_zero_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-orangepi-zero" CONFIG_CONSOLE_MUX=y # CONFIG_CMD_FLASH is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_zero_plus2_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-zero-plus2" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_zero_plus_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-zero-plus" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/parrot_r16_defconfig +1 -0
@@ -17,6 +17,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-r16-parrot" # CONFIG_SPL_PARTITION_UUIDS is not set CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_CONS_INDEX=5 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/pine64_plus_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus" CONFIG_PHY_REALTEK=y CONFIG_RTL8211E_PINE64_GIGABIT_FIX=y CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/r7-tv-dongle_defconfig +1 -0
@@ -12,5 +12,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_AXP152_POWER=y CONFIG_CONS_INDEX=2 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/sopine_baseboard_defconfig +1 -0
@@ -16,5 +16,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-sopine-baseboard" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SUN8I_EMAC=y +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/sun8i_a23_evb_defconfig +1 -0
@@ -13,5 +13,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-a23-evb" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_CONS_INDEX=5 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/sunxi_Gemei_G9_defconfig +1 -0
@@ -15,5 +15,6 @@ CONFIG_SPL_I2C_SUPPORT=y # CONFIG_CMD_FLASH is not set # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/tbs_a711_defconfig +1 -0
@@ -18,6 +18,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-a83t-tbs-a711" # CONFIG_SPL_EFI_PARTITION is not set CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_AXP_DCDC5_VOLT=1200 +CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_USB_FUNCTION_MASS_STORAGE=y
drivers/usb/host/Kconfig +2 -0
@@ -191,6 +191,7 @@ config USB_EHCI_GENERIC bool "Support for generic EHCI USB controller" depends on OF_CONTROL depends on DM_USB + default ARCH_SUNXI default n ---help--- Enables support for generic EHCI controller.
@@ -221,6 +222,7 @@ config USB_OHCI_GENERIC bool "Support for generic OHCI USB controller" depends on OF_CONTROL depends on DM_USB + default ARCH_SUNXI select USB_HOST ---help--- Enables support for generic OHCI controller.
include/configs/sun4i.h +0 -4
@@ -11,10 +11,6 @@* A10 specific configuration */ -#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_USB_EHCI_SUNXI -#endif -/* * Include common sunxi configuration where most the settings are */
include/configs/sun50i.h +0 -5
@@ -10,11 +10,6 @@* A64 specific configuration */ -#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_USB_EHCI_SUNXI -#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 -#endif -#ifndef CONFIG_MACH_SUN50I_H6 #define GICD_BASE 0x1c81000#define GICC_BASE 0x1c82000
include/configs/sun5i.h +0 -4
@@ -11,10 +11,6 @@* High Level Configuration Options */ -#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_USB_EHCI_SUNXI -#endif -/* * Include common sunxi configuration where most the settings are */
include/configs/sun6i.h +0 -4
@@ -14,10 +14,6 @@* A31 specific configuration */ -#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_USB_EHCI_SUNXI -#endif -#define CONFIG_ARMV7_SECURE_BASE SUNXI_SRAM_B_BASE#define CONFIG_ARMV7_SECURE_MAX_SIZE (64 * 1024)/* 64 KB */
include/configs/sun7i.h +0 -4
@@ -12,10 +12,6 @@* A20 specific configuration */ -#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_USB_EHCI_SUNXI -#endif -#define CONFIG_ARMV7_SECURE_BASE SUNXI_SRAM_B_BASE#define CONFIG_ARMV7_SECURE_MAX_SIZE (64 * 1024)/* 64 KB */
include/configs/sun8i.h +0 -4
@@ -12,10 +12,6 @@* A23 specific configuration */ -#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_USB_EHCI_SUNXI -#endif -/* * Include common sunxi configuration where most the settings are */
include/configs/sunxi-common.h +0 -1
@@ -302,7 +302,6 @@ extern int soft_i2c_gpio_scl;#ifdef CONFIG_USB_EHCI_HCD #define CONFIG_USB_OHCI_NEW -#define CONFIG_USB_OHCI_SUNXI #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1#endif
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 18/42 usb: host: Drop [e-o]hci-sunxi drivers
In reply to Jagan TekiNow Allwinner platform is all set to use Generic USB controller drivers, so remove the legacy sunxi drivers.
--- drivers/usb/host/Makefile | 2 - drivers/usb/host/ehci-sunxi.c | 204 ----------------------------- drivers/usb/host/ohci-sunxi.c | 233 ---------------------------------- scripts/config_whitelist.txt | 2 - 4 files changed, 441 deletions(-) delete mode 100644 drivers/usb/host/ehci-sunxi.c delete mode 100644 drivers/usb/host/ohci-sunxi.c
drivers/usb/host/Makefile +0 -2
@@ -15,7 +15,6 @@ obj-$(CONFIG_USB_OHCI_DA8XX) += ohci-da8xx.o obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o obj-$(CONFIG_USB_SL811HS) += sl811-hcd.o obj-$(CONFIG_USB_OHCI_EP93XX) += ohci-ep93xx.o -obj-$(CONFIG_USB_OHCI_SUNXI) += ohci-sunxi.o obj-$(CONFIG_USB_OHCI_LPC32XX) += ohci-lpc32xx.o obj-$(CONFIG_USB_OHCI_GENERIC) += ohci-generic.o
@@ -37,7 +36,6 @@ obj-$(CONFIG_USB_EHCI_MARVELL) += ehci-marvell.o obj-$(CONFIG_USB_EHCI_MSM) += ehci-msm.o obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o obj-$(CONFIG_USB_EHCI_SPEAR) += ehci-spear.o -obj-$(CONFIG_USB_EHCI_SUNXI) += ehci-sunxi.o obj-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o obj-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o obj-$(CONFIG_USB_EHCI_VF) += ehci-vf.o
drivers/usb/host/ehci-sunxi.c deleted +0 -204
204 lines not on this page · raw message
drivers/usb/host/ohci-sunxi.c deleted +0 -233
233 lines not on this page · raw message
scripts/config_whitelist.txt +0 -2
@@ -4611,7 +4611,6 @@ CONFIG_USB_EHCI_MX5 CONFIG_USB_EHCI_MXC CONFIG_USB_EHCI_MXS CONFIG_USB_EHCI_SPEAR -CONFIG_USB_EHCI_SUNXI CONFIG_USB_EHCI_TEGRA CONFIG_USB_EHCI_TXFIFO_THRESH CONFIG_USB_EHCI_VCT
@@ -4653,7 +4652,6 @@ CONFIG_USB_OHCI CONFIG_USB_OHCI_EP93XX CONFIG_USB_OHCI_LPC32XX CONFIG_USB_OHCI_NEW -CONFIG_USB_OHCI_SUNXI CONFIG_USB_OTG CONFIG_USB_OTG_BLACKLIST_HUB CONFIG_USB_PHY_CFG_BASE
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 19/42 clk: sunxi: Implement AHB bus MMC clocks
In reply to Jagan TekiImplement AHB bus MMC clocks for all Allwinner SoC clock drivers via clock map descriptor table.
--- drivers/clk/sunxi/clk_a10.c | 4 ++++ drivers/clk/sunxi/clk_a10s.c | 3 +++ drivers/clk/sunxi/clk_a23.c | 3 +++ drivers/clk/sunxi/clk_a31.c | 4 ++++ drivers/clk/sunxi/clk_a64.c | 3 +++ drivers/clk/sunxi/clk_a83t.c | 3 +++ drivers/clk/sunxi/clk_h3.c | 3 +++ drivers/clk/sunxi/clk_r40.c | 4 ++++ drivers/clk/sunxi/clk_v3s.c | 3 +++ 9 files changed, 30 insertions(+)
drivers/clk/sunxi/clk_a10.c +4 -0
@@ -18,6 +18,10 @@ static struct ccu_clk_map a10_clks[] = { [CLK_AHB_OHCI0] = { 0x060, BIT(2), NULL }, [CLK_AHB_EHCI1] = { 0x060, BIT(3), NULL }, [CLK_AHB_OHCI1] = { 0x060, BIT(4), NULL }, + [CLK_AHB_MMC0] = { 0x060, BIT(8), NULL }, + [CLK_AHB_MMC1] = { 0x060, BIT(9), NULL }, + [CLK_AHB_MMC2] = { 0x060, BIT(10), NULL }, + [CLK_AHB_MMC3] = { 0x060, BIT(11), NULL }, [CLK_USB_OHCI0] = { 0x0cc, BIT(6), NULL }, [CLK_USB_OHCI1] = { 0x0cc, BIT(7), NULL },
drivers/clk/sunxi/clk_a10s.c +3 -0
@@ -16,6 +16,9 @@ static struct ccu_clk_map a10s_clks[] = { [CLK_AHB_OTG] = { 0x060, BIT(0), NULL }, [CLK_AHB_EHCI] = { 0x060, BIT(1), NULL }, [CLK_AHB_OHCI] = { 0x060, BIT(2), NULL }, + [CLK_AHB_MMC0] = { 0x060, BIT(8), NULL }, + [CLK_AHB_MMC1] = { 0x060, BIT(9), NULL }, + [CLK_AHB_MMC2] = { 0x060, BIT(10), NULL }, [CLK_USB_OHCI] = { 0x0cc, BIT(6), NULL }, [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL },
drivers/clk/sunxi/clk_a23.c +3 -0
@@ -13,6 +13,9 @@#include <dt-bindings/reset/sun8i-a23-a33-ccu.h> static struct ccu_clk_map a23_clks[] = { + [CLK_BUS_MMC0 ] = {0x060 ,BIT (8 ),NULL }, + [CLK_BUS_MMC1 ] = {0x060 ,BIT (9 ),NULL }, + [CLK_BUS_MMC2 ] = {0x060 ,BIT (10 ),NULL }, [CLK_BUS_OTG ] = {0x060 ,BIT (24 ),NULL }, [CLK_BUS_EHCI ] = {0x060 ,BIT (26 ),NULL }, [CLK_BUS_OHCI ] = {0x060 ,BIT (29 ),NULL },
drivers/clk/sunxi/clk_a31.c +4 -0
@@ -13,6 +13,10 @@#include <dt-bindings/reset/sun6i-a31-ccu.h> static struct ccu_clk_map a31_clks[] = { + [CLK_AHB1_MMC0 ] = {0x060 ,BIT (8 ),NULL }, + [CLK_AHB1_MMC1 ] = {0x060 ,BIT (9 ),NULL }, + [CLK_AHB1_MMC2 ] = {0x060 ,BIT (10 ),NULL }, + [CLK_AHB1_MMC3 ] = {0x060 ,BIT (12 ),NULL }, [CLK_AHB1_OTG ] = {0x060 ,BIT (24 ),NULL }, [CLK_AHB1_EHCI0 ] = {0x060 ,BIT (26 ),NULL }, [CLK_AHB1_EHCI1 ] = {0x060 ,BIT (27 ),NULL },
drivers/clk/sunxi/clk_a64.c +3 -0
@@ -13,6 +13,9 @@#include <dt-bindings/reset/sun50i-a64-ccu.h> static struct ccu_clk_map a64_clks[] = { + [CLK_BUS_MMC0 ] = {0x060 ,BIT (8 ),NULL }, + [CLK_BUS_MMC1 ] = {0x060 ,BIT (9 ),NULL }, + [CLK_BUS_MMC2 ] = {0x060 ,BIT (10 ),NULL }, [CLK_BUS_OTG ] = {0x060 ,BIT (23 ),NULL }, [CLK_BUS_EHCI0 ] = {0x060 ,BIT (24 ),NULL }, [CLK_BUS_EHCI1 ] = {0x060 ,BIT (25 ),NULL },
drivers/clk/sunxi/clk_a83t.c +3 -0
@@ -13,6 +13,9 @@#include <dt-bindings/reset/sun8i-a83t-ccu.h> static struct ccu_clk_map a83t_clks[] = { + [CLK_BUS_MMC0 ] = {0x060 ,BIT (8 ),NULL }, + [CLK_BUS_MMC1 ] = {0x060 ,BIT (9 ),NULL }, + [CLK_BUS_MMC2 ] = {0x060 ,BIT (10 ),NULL }, [CLK_BUS_OTG ] = {0x060 ,BIT (24 ),NULL }, [CLK_BUS_EHCI0 ] = {0x060 ,BIT (26 ),NULL }, [CLK_BUS_EHCI1 ] = {0x060 ,BIT (27 ),NULL },
drivers/clk/sunxi/clk_h3.c +3 -0
@@ -13,6 +13,9 @@#include <dt-bindings/reset/sun8i-h3-ccu.h> static struct ccu_clk_map h3_clks[] = { + [CLK_BUS_MMC0 ] = {0x060 ,BIT (8 ),NULL }, + [CLK_BUS_MMC1 ] = {0x060 ,BIT (9 ),NULL }, + [CLK_BUS_MMC2 ] = {0x060 ,BIT (10 ),NULL }, [CLK_BUS_OTG ] = {0x060 ,BIT (23 ),NULL }, [CLK_BUS_EHCI0 ] = {0x060 ,BIT (24 ),NULL }, [CLK_BUS_EHCI1 ] = {0x060 ,BIT (25 ),NULL },
drivers/clk/sunxi/clk_r40.c +4 -0
@@ -13,6 +13,10 @@#include <dt-bindings/reset/sun8i-r40-ccu.h> static struct ccu_clk_map r40_clks[] = { + [CLK_BUS_MMC0 ] = {0x060 ,BIT (8 ),NULL }, + [CLK_BUS_MMC1 ] = {0x060 ,BIT (9 ),NULL }, + [CLK_BUS_MMC2 ] = {0x060 ,BIT (10 ),NULL }, + [CLK_BUS_MMC3 ] = {0x060 ,BIT (11 ),NULL }, [CLK_BUS_OTG ] = {0x060 ,BIT (25 ),NULL }, [CLK_BUS_EHCI0 ] = {0x060 ,BIT (26 ),NULL }, [CLK_BUS_EHCI1 ] = {0x060 ,BIT (27 ),NULL },
drivers/clk/sunxi/clk_v3s.c +3 -0
@@ -13,6 +13,9 @@#include <dt-bindings/reset/sun8i-v3s-ccu.h> static struct ccu_clk_map v3s_clks[] = { + [CLK_BUS_MMC0 ] = {0x060 ,BIT (8 ),NULL }, + [CLK_BUS_MMC1 ] = {0x060 ,BIT (9 ),NULL }, + [CLK_BUS_MMC2 ] = {0x060 ,BIT (10 ),NULL }, [CLK_BUS_OTG ] = {0x060 ,BIT (24 ),NULL }, [CLK_USB_PHY0 ] = {0x0cc ,BIT (8 ),NULL },
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 20/42 clk: sunxi: Implement direct MMC clocks
In reply to Jagan TekiImplement direct MMC clocks for all Allwinner SoC clock drivers via clock map descriptor table.
This includes adding ccu_clk_set_rate function pointer, which indeed support CLK set_rate API, so update clock handling in sunxi_mmc driver to support both no-dm and dm code.
--- arch/arm/include/asm/arch-sunxi/ccu.h | 10 +++++ drivers/clk/sunxi/clk_a10.c | 5 +++ drivers/clk/sunxi/clk_a10s.c | 6 +++ drivers/clk/sunxi/clk_a23.c | 6 +++ drivers/clk/sunxi/clk_a31.c | 5 +++ drivers/clk/sunxi/clk_a64.c | 4 ++ drivers/clk/sunxi/clk_a83t.c | 4 ++ drivers/clk/sunxi/clk_h3.c | 4 ++ drivers/clk/sunxi/clk_r40.c | 4 ++ drivers/clk/sunxi/clk_sunxi.c | 19 +++++++++ drivers/clk/sunxi/clk_v3s.c | 4 ++ drivers/mmc/sunxi_mmc.c | 58 +++++++++++++++++---------- 12 files changed, 107 insertions(+), 22 deletions(-)
arch/arm/include/asm/arch-sunxi/ccu.h +10 -0
@@ -60,6 +60,16 @@ struct sunxi_clk_priv {extern struct clk_ops sunxi_clk_ops; +/** +* mmc_clk_set_rate - mmc clock set rate +* +* @base: clock register base address +* @bit: clock bit value +* @rate: clock input rate in Hz +* @return 0, or -ve error code. +*/ +int mmc_clk_set_rate (void *base,u32 bit,ulong rate); +/** * sunxi_reset_bind() - reset binding *
drivers/clk/sunxi/clk_a10.c +5 -0
@@ -23,6 +23,11 @@ static struct ccu_clk_map a10_clks[] = { [CLK_AHB_MMC2] = { 0x060, BIT(10), NULL }, [CLK_AHB_MMC3] = { 0x060, BIT(11), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC3] = { 0x094, BIT(31), &mmc_clk_set_rate }, + [CLK_USB_OHCI0] = { 0x0cc, BIT(6), NULL }, [CLK_USB_OHCI1] = { 0x0cc, BIT(7), NULL }, [CLK_USB_PHY] = { 0x0cc, BIT(8), NULL },
drivers/clk/sunxi/clk_a10s.c +6 -0
@@ -20,6 +20,12 @@ static struct ccu_clk_map a10s_clks[] = { [CLK_AHB_MMC1] = { 0x060, BIT(9), NULL }, [CLK_AHB_MMC2] = { 0x060, BIT(10), NULL }, +#ifdef CONFIG_MMC + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, +#endif + [CLK_USB_OHCI] = { 0x0cc, BIT(6), NULL }, [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, [CLK_USB_PHY1] = { 0x0cc, BIT(9), NULL },
drivers/clk/sunxi/clk_a23.c +6 -0
@@ -20,6 +20,12 @@ static struct ccu_clk_map a23_clks[] = { [CLK_BUS_EHCI] = { 0x060, BIT(26), NULL }, [CLK_BUS_OHCI] = { 0x060, BIT(29), NULL }, +#ifdef CONFIG_MMC + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, +#endif + [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, [CLK_USB_PHY1] = { 0x0cc, BIT(9), NULL }, [CLK_USB_HSIC] = { 0x0cc, BIT(10), NULL },
drivers/clk/sunxi/clk_a31.c +5 -0
@@ -24,6 +24,11 @@ static struct ccu_clk_map a31_clks[] = { [CLK_AHB1_OHCI1] = { 0x060, BIT(30), NULL }, [CLK_AHB1_OHCI2] = { 0x060, BIT(31), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC3] = { 0x094, BIT(31), &mmc_clk_set_rate }, + [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, [CLK_USB_PHY1] = { 0x0cc, BIT(9), NULL }, [CLK_USB_PHY2] = { 0x0cc, BIT(10), NULL },
drivers/clk/sunxi/clk_a64.c +4 -0
@@ -22,6 +22,10 @@ static struct ccu_clk_map a64_clks[] = { [CLK_BUS_OHCI0] = { 0x060, BIT(28), NULL }, [CLK_BUS_OHCI1] = { 0x060, BIT(29), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, + [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, [CLK_USB_PHY1] = { 0x0cc, BIT(9), NULL }, [CLK_USB_HSIC] = { 0x0cc, BIT(10), NULL },
drivers/clk/sunxi/clk_a83t.c +4 -0
@@ -21,6 +21,10 @@ static struct ccu_clk_map a83t_clks[] = { [CLK_BUS_EHCI1] = { 0x060, BIT(27), NULL }, [CLK_BUS_OHCI0] = { 0x060, BIT(29), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, + [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, [CLK_USB_PHY1] = { 0x0cc, BIT(9), NULL }, [CLK_USB_HSIC] = { 0x0cc, BIT(10), NULL },
drivers/clk/sunxi/clk_h3.c +4 -0
@@ -26,6 +26,10 @@ static struct ccu_clk_map h3_clks[] = { [CLK_BUS_OHCI2] = { 0x060, BIT(30), NULL }, [CLK_BUS_OHCI3] = { 0x060, BIT(31), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, + [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, [CLK_USB_PHY1] = { 0x0cc, BIT(9), NULL }, [CLK_USB_PHY2] = { 0x0cc, BIT(10), NULL },
drivers/clk/sunxi/clk_r40.c +4 -0
@@ -25,6 +25,10 @@ static struct ccu_clk_map r40_clks[] = { [CLK_BUS_OHCI1] = { 0x060, BIT(30), NULL }, [CLK_BUS_OHCI2] = { 0x060, BIT(31), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC3] = { 0x094, BIT(31), &mmc_clk_set_rate }, [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, [CLK_USB_PHY1] = { 0x0cc, BIT(9), NULL },
drivers/clk/sunxi/clk_sunxi.c +19 -0
@@ -12,6 +12,24 @@#include <asm/arch/ccu.h> #include <linux/log2.h> +static ulong sunxi_clk_set_rate (struct clk *clk,ulong rate) +{ +struct sunxi_clk_priv *priv =dev_get_priv (clk->dev); +struct ccu_clk_map *map = &priv->desc->clks[clk->id]; +u32 *base; + +if (!map->ccu_clk_set_rate) { +debug ("%s (CLK#%ld) unhandled\n" , __func__, clk->id); +return 0 ; + } + +debug ("%s(#%ld) off#0x%x, BIT(%d)\n" , __func__, + clk->id, map->off,ilog2 (map->bit)); + + base = priv->base + map->off; +return map->ccu_clk_set_rate (base, map->bit, rate); +} +static int sunxi_clk_enable (struct clk *clk) {struct sunxi_clk_priv *priv =dev_get_priv (clk->dev);
@@ -55,4 +73,5 @@ static int sunxi_clk_disable(struct clk *clk)struct clk_ops sunxi_clk_ops = { .enable = sunxi_clk_enable, .disable = sunxi_clk_disable, + .set_rate = sunxi_clk_set_rate, };
drivers/clk/sunxi/clk_v3s.c +4 -0
@@ -18,6 +18,10 @@ static struct ccu_clk_map v3s_clks[] = { [CLK_BUS_MMC2] = { 0x060, BIT(10), NULL }, [CLK_BUS_OTG] = { 0x060, BIT(24), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, + [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, + [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, };
drivers/mmc/sunxi_mmc.c +36 -22
139 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 21/42 clk: sunxi: Implement AHB bus MMC resets
In reply to Jagan TekiImplement AHB bus MMC resets for all Allwinner SoC clock drivers via reset map descriptor table.
--- drivers/clk/sunxi/clk_a23.c | 3 +++ drivers/clk/sunxi/clk_a31.c | 4 ++++ drivers/clk/sunxi/clk_a64.c | 3 +++ drivers/clk/sunxi/clk_a83t.c | 3 +++ drivers/clk/sunxi/clk_h3.c | 3 +++ drivers/clk/sunxi/clk_r40.c | 4 ++++ drivers/clk/sunxi/clk_v3s.c | 3 +++ 7 files changed, 23 insertions(+)
drivers/clk/sunxi/clk_a23.c +3 -0
@@ -38,6 +38,9 @@ static struct ccu_reset_map a23_resets[] = { [RST_USB_PHY1] = { 0x0cc, BIT(1) }, [RST_USB_HSIC] = { 0x0cc, BIT(2) }, + [RST_BUS_MMC0] = { 0x2c0, BIT(8) }, + [RST_BUS_MMC1] = { 0x2c0, BIT(9) }, + [RST_BUS_MMC2] = { 0x2c0, BIT(10) }, [RST_BUS_OTG] = { 0x2c0, BIT(24) }, [RST_BUS_EHCI] = { 0x2c0, BIT(26) }, [RST_BUS_OHCI] = { 0x2c0, BIT(29) },
drivers/clk/sunxi/clk_a31.c +4 -0
@@ -42,6 +42,10 @@ static struct ccu_reset_map a31_resets[] = { [RST_USB_PHY1] = { 0x0cc, BIT(1) }, [RST_USB_PHY2] = { 0x0cc, BIT(2) }, + [RST_AHB1_MMC0] = { 0x2c0, BIT(8) }, + [RST_AHB1_MMC1] = { 0x2c0, BIT(9) }, + [RST_AHB1_MMC2] = { 0x2c0, BIT(10) }, + [RST_AHB1_MMC3] = { 0x2c0, BIT(11) }, [RST_AHB1_OTG] = { 0x2c0, BIT(24) }, [RST_AHB1_EHCI0] = { 0x2c0, BIT(26) }, [RST_AHB1_EHCI1] = { 0x2c0, BIT(27) },
drivers/clk/sunxi/clk_a64.c +3 -0
@@ -39,6 +39,9 @@ static struct ccu_reset_map a64_resets[] = { [RST_USB_PHY1] = { 0x0cc, BIT(1) }, [RST_USB_HSIC] = { 0x0cc, BIT(2) }, + [RST_BUS_MMC0] = { 0x2c0, BIT(8) }, + [RST_BUS_MMC1] = { 0x2c0, BIT(9) }, + [RST_BUS_MMC2] = { 0x2c0, BIT(10) }, [RST_BUS_OTG] = { 0x2c0, BIT(23) }, [RST_BUS_EHCI0] = { 0x2c0, BIT(24) }, [RST_BUS_EHCI1] = { 0x2c0, BIT(25) },
drivers/clk/sunxi/clk_a83t.c +3 -0
@@ -37,6 +37,9 @@ static struct ccu_reset_map a83t_resets[] = { [RST_USB_PHY1] = { 0x0cc, BIT(1) }, [RST_USB_HSIC] = { 0x0cc, BIT(2) }, + [RST_BUS_MMC0] = { 0x2c0, BIT(8) }, + [RST_BUS_MMC1] = { 0x2c0, BIT(9) }, + [RST_BUS_MMC2] = { 0x2c0, BIT(10) }, [RST_BUS_OTG] = { 0x2c0, BIT(24) }, [RST_BUS_EHCI0] = { 0x2c0, BIT(26) }, [RST_BUS_EHCI1] = { 0x2c0, BIT(27) },
drivers/clk/sunxi/clk_h3.c +3 -0
@@ -46,6 +46,9 @@ static struct ccu_reset_map h3_resets[] = { [RST_USB_PHY2] = { 0x0cc, BIT(2) }, [RST_USB_PHY3] = { 0x0cc, BIT(3) }, + [RST_BUS_MMC0] = { 0x2c0, BIT(8) }, + [RST_BUS_MMC1] = { 0x2c0, BIT(9) }, + [RST_BUS_MMC2] = { 0x2c0, BIT(10) }, [RST_BUS_OTG] = { 0x2c0, BIT(23) }, [RST_BUS_EHCI0] = { 0x2c0, BIT(24) }, [RST_BUS_EHCI1] = { 0x2c0, BIT(25) },
drivers/clk/sunxi/clk_r40.c +4 -0
@@ -43,6 +43,10 @@ static struct ccu_reset_map r40_resets[] = { [RST_USB_PHY1] = { 0x0cc, BIT(1) }, [RST_USB_PHY2] = { 0x0cc, BIT(2) }, + [RST_BUS_MMC0] = { 0x2c0, BIT(8) }, + [RST_BUS_MMC1] = { 0x2c0, BIT(9) }, + [RST_BUS_MMC2] = { 0x2c0, BIT(10) }, + [RST_BUS_MMC3] = { 0x2c0, BIT(11) }, [RST_BUS_OTG] = { 0x2c0, BIT(25) }, [RST_BUS_EHCI0] = { 0x2c0, BIT(26) }, [RST_BUS_EHCI1] = { 0x2c0, BIT(27) },
drivers/clk/sunxi/clk_v3s.c +3 -0
@@ -28,6 +28,9 @@ static struct ccu_clk_map v3s_clks[] = {static struct ccu_reset_map v3s_resets[] = { [RST_USB_PHY0 ] = {0x0cc ,BIT (0 ) }, + [RST_BUS_MMC0 ] = {0x2c0 ,BIT (8 ) }, + [RST_BUS_MMC1 ] = {0x2c0 ,BIT (9 ) }, + [RST_BUS_MMC2 ] = {0x2c0 ,BIT (10 ) }, [RST_BUS_OTG ] = {0x2c0 ,BIT (24 ) }, };
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 22/42 reset: Add get reset by name optionally
In reply to Jagan TekiReset is an optional for some controllers with some families of CPU's with same SoC where the common IP driver can handle to drive the entire SoC families. optional reset get by name is useful for those drivers to make common way of reset handling.
Example, In Allwinner SoC with MMC controllers has no reset for Sun4i, 5i, 7i but reset have reset.
--- drivers/reset/reset-uclass.c | 17 +++++++++++++++++ include/reset.h | 25 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+)
drivers/reset/reset-uclass.c +17 -0
@@ -138,6 +138,23 @@ int reset_get_by_name(struct udevice *dev, const char *name,return reset_get_by_index (dev, index, reset_ctl); } +int reset_get_by_name_optional (struct udevice *dev,const char *name, +struct reset_ctl *reset_ctl,bool optional) +{ +int index; + +debug ("%s(dev=%p, name=%s, reset_ctl=%p)\n" , __func__, dev, name, + reset_ctl); + reset_ctl->dev =NULL ; + + index =dev_read_stringlist_search (dev,"reset-names" , name); +if (index <0 ) { +printf ("reset_get_by_name_optional: optional = %d, index = %d\n" , optional, index); +return optional ?0 : index; + } + +return reset_get_by_index (dev, index, reset_ctl); +}int reset_request (struct reset_ctl *reset_ctl) {struct reset_ops *ops =reset_dev_ops (reset_ctl->dev);
include/reset.h +25 -0
@@ -132,6 +132,23 @@ int reset_get_bulk(struct udevice *dev, struct reset_ctl_bulk *bulk);int reset_get_by_name (struct udevice *dev,const char *name,struct reset_ctl *reset_ctl); +/** +* reset_get_by_name_optional - Get/request a reset signal by name optionally. +* +* This look up and requests a reset signal similar to reset_get_by_name() +* but with optional flag. +* +* @dev: The client device. +* @name: The name of the reset signal to request, within the client's +* list of reset signals. +* @reset_ctl: A pointer to a reset control struct to initialize. +* @optional: Optional flag, true if reset is optional, false if reset is +* necessary which is same as reset_get_by_name() +* @return 0 if OK, or a negative error code. +*/ +int reset_get_by_name_optional (struct udevice *dev,const char *name, +struct reset_ctl *reset_ctl,bool optional); +/** * reset_request - Request a reset signal. *
@@ -254,6 +271,14 @@ static inline int reset_get_by_name(struct udevice *dev, const char *name,return -ENOTSUPP ; } +static inline int reset_get_by_name_optional (struct udevice *dev, +const char *name, +struct reset_ctl *reset_ctl, +bool optional) +{ +return -ENOTSUPP ; +} +static inline int reset_free (struct reset_ctl *reset_ctl) {return 0 ;
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 23/42 reset: Add reset valid
In reply to Jagan TekiAdd reset_valid to check whether given reset is valid or not.
--- include/reset.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
include/reset.h +11 -0
@@ -315,4 +315,15 @@ static inline int reset_release_bulk(struct reset_ctl_bulk *bulk) }#endif +/** +* reset_valid() - check if reset is valid +* +* @reset_ctl: the reset to check +* @return TRUE if valid, or FALSE +*/ +static inline bool reset_valid (struct reset_ctl *reset_ctl) +{ +return !!reset_ctl->dev; +} +#endif
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 24/42 dm: mmc: sunxi: Add CLK and RESET support
In reply to Jagan TekiNow CLK and RESET driver for Allwinner SoC are available, so add the relevant operations on mmc sunxi driver.
--- drivers/mmc/sunxi_mmc.c | 60 +++++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 14 deletions(-)
drivers/mmc/sunxi_mmc.c +46 -14
@@ -8,10 +8,12 @@*/ #include <common.h> +#include <clk.h> #include <dm.h> #include <errno.h> #include <malloc.h> #include <mmc.h> +#include <reset.h> #include <asm/io.h> #include <asm/arch/ccu.h> #include <asm/arch/clock.h>
@@ -26,8 +28,12 @@ struct sunxi_mmc_plat { };struct sunxi_mmc_priv { +#if CONFIG_IS_ENABLED (DM_MMC ) &&CONFIG_IS_ENABLED (CLK ) +struct clk mmc_clk; +#else unsigned mmc_no;uint32_t *mclkreg; +#endif unsigned fatal_err;struct gpio_desc cd_gpio;/* Change Detect GPIO */ int cd_inverted;/* Inverted Card Detect */
@@ -188,6 +194,15 @@ int mmc_clk_set_rate(void *base, u32 bit, ulong rate)static int mmc_set_mod_clk (struct sunxi_mmc_priv *priv,unsigned int hz) {#if CONFIG_IS_ENABLED (DM_MMC ) &&CONFIG_IS_ENABLED (CLK ) +int ret; + + ret =clk_set_rate (&priv->mmc_clk, hz); +if (ret) { +dev_err (dev,"failed to set rate for mmc_clk\n" ); +return ret; + } + +return ret;#else if (IS_ENABLED (CONFIG_MMC_SUNXI_HAS_NEW_MODE ) && (priv->mmc_no ==2 )) new_mode = true;
@@ -379,7 +394,7 @@ static int sunxi_mmc_send_cmd_common(struct sunxi_mmc_priv *priv,writel (data->blocks * data->blocksize, &priv->reg->bytecnt); } -debug ("mmc %d, cmd %d(0x%08x), arg 0x%08x\n" , priv->mmc_no, +debug ("mmc cmd %d(0x%08x), arg 0x%08x\n" , cmd->cmdidx, cmdval | cmd->cmdidx, cmd->cmdarg);writel (cmd->cmdarg, &priv->reg->arg);
@@ -591,8 +606,8 @@ static int sunxi_mmc_probe(struct udevice *dev)struct sunxi_mmc_plat *plat =dev_get_platdata (dev);struct sunxi_mmc_priv *priv =dev_get_priv (dev);struct mmc_config *cfg = &plat->cfg; -struct ofnode_phandle_args args; -u32 *gate_reg; +struct clk ahb_clk; +struct reset_ctl reset;int bus_width, ret; cfg->name = dev->name;
@@ -615,20 +630,37 @@ static int sunxi_mmc_probe(struct udevice *dev) priv->reg = (void *)dev_read_addr (dev); -/* We don't have a sunxi clock driver so find the clock address here */ - ret =dev_read_phandle_with_args (dev,"clocks" ,"#clock-cells" ,0 , -1 , &args); -if (ret) + ret =clk_get_by_name (dev,"ahb" , &ahb_clk); +if (ret) { +dev_err (dev,"falied to get ahb clock\n" );return ret; - priv->mclkreg = (u32 *)ofnode_get_addr (args.node); + } - ret =dev_read_phandle_with_args (dev,"clocks" ,"#clock-cells" ,0 , -0 , &args); -if (ret) + ret =clk_get_by_name (dev,"mmc" , &priv->mmc_clk); +if (ret) { +dev_err (dev,"falied to get mmc clock\n" );return ret; - gate_reg = (u32 *)ofnode_get_addr (args.node); -setbits_le32 (gate_reg,1 << args.args[0 ]); - priv->mmc_no = args.args[0 ] -8 ; + } + + ret =reset_get_by_name_optional (dev,"ahb" , &reset, true); +if (ret) { +dev_err (dev,"falied to get ahb reset\n" ); +return ret; + } + + ret =clk_enable (&ahb_clk); +if (ret) { +dev_err (dev,"failed to enable ahb clock\n" ); +return ret; + } + +if (reset_valid (&reset)) { + ret =reset_deassert (&reset); +if (ret) { +dev_err (dev,"failed to deassert ahb reset\n" ); +return ret; + } + } ret =mmc_set_mod_clk (priv,24000000 );if (ret)
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 25/42 fastboot: sunxi: Update fastboot mmc default device
In reply to Jagan TekiUsually eMMC is default env fat device for environment, if MMC_SUNXI_SLOT_EXTRA != 1 Sunxi always probed emmc device as 1. but with DM_MMC it can be more possible to probe eMMC as device 2 since for most of the sunxi platforms eMMC is configured mmc2.
So update the fastboot mmc default device as 2 if DM_MMC and MMC_SUNXI_SLOT_EXTRA != 1 slot is 2 defined but some boards may not use all possible mmc devices or partly disabled in DT, for those update the device in board specific defconfig.
--- configs/A20-OLinuXino-Lime2-eMMC_defconfig | 1 + configs/Sinlinx_SinA33_defconfig | 1 + configs/amarula_a64_relic_defconfig | 1 + drivers/fastboot/Kconfig | 3 ++- 4 files changed, 5 insertions(+), 1 deletion(-)
configs/A20-OLinuXino-Lime2-eMMC_defconfig +1 -0
@@ -30,4 +30,5 @@ CONFIG_SCSI=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Sinlinx_SinA33_defconfig +1 -0
@@ -22,5 +22,6 @@ CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y CONFIG_USB_FUNCTION_MASS_STORAGE=y
configs/amarula_a64_relic_defconfig +1 -0
@@ -12,4 +12,5 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-amarula-relic" # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set CONFIG_USB_MUSB_GADGET=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
drivers/fastboot/Kconfig +2 -1
@@ -88,7 +88,8 @@ config FASTBOOT_FLASH_MMC_DEV int "Define FASTBOOT MMC FLASH default device" depends on FASTBOOT_FLASH_MMC default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1 - default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1 + default 1 if ARCH_SUNXI && !DM_MMC && MMC_SUNXI_SLOT_EXTRA != -1 + default 2 if ARCH_SUNXI && DM_MMC && MMC_SUNXI_SLOT_EXTRA != -1 help The fastboot "flash" command requires additional information regarding the non-volatile storage device. Define this to
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 26/42 env: sunxi: Update default env fat device
In reply to Jagan TekiUsually eMMC is default env fat device for environment, if MMC_SUNXI_SLOT_EXTRA != 1 Sunxi always probed emmc device as 1. but with DM_MMC it can be more possible to probe eMMC as device 2 since for most of the sunxi platforms eMMC is configured mmc2.
So update the env default device as 2 if DM_MMC and MMC_SUNXI_SLOT_EXTRA != 1 but some boards may not use all possible mmc devices or partly disabled in DT, for those update the device in board specific defconfig.
--- configs/A20-OLinuXino-Lime2-eMMC_defconfig | 1 + configs/A20-OLinuXino_MICRO-eMMC_defconfig | 1 + configs/A20-OLinuXino_MICRO_defconfig | 1 + configs/A20-Olimex-SOM-EVB_defconfig | 1 + configs/A20-Olimex-SOM204-EVB-eMMC_defconfig | 1 + configs/Mele_M3_defconfig | 1 + configs/Orangepi_mini_defconfig | 1 + configs/Sinlinx_SinA33_defconfig | 1 + configs/Yones_Toptech_BD1078_defconfig | 1 + configs/amarula_a64_relic_defconfig | 1 + env/Kconfig | 3 ++- 11 files changed, 12 insertions(+), 1 deletion(-)
configs/A20-OLinuXino-Lime2-eMMC_defconfig +1 -0
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y CONFIG_DRAM_CLK=384 CONFIG_MMC0_CD_PIN="PH1" CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" CONFIG_USB0_VBUS_PIN="PC17" CONFIG_USB0_VBUS_DET="PH5" CONFIG_I2C1_ENABLE=y
configs/A20-OLinuXino_MICRO-eMMC_defconfig +1 -0
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y CONFIG_DRAM_CLK=384 CONFIG_MMC0_CD_PIN="PH1" CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" CONFIG_I2C1_ENABLE=y CONFIG_VIDEO_VGA=y CONFIG_SATAPWR="PB8"
configs/A20-OLinuXino_MICRO_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=384 CONFIG_MMC0_CD_PIN="PH1" CONFIG_MMC3_CD_PIN="PH11" CONFIG_MMC_SUNXI_SLOT_EXTRA=3 +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" CONFIG_I2C1_ENABLE=y CONFIG_VIDEO_VGA=y CONFIG_SATAPWR="PB8"
configs/A20-Olimex-SOM-EVB_defconfig +1 -0
@@ -7,6 +7,7 @@ CONFIG_MMC0_CD_PIN="PH1" CONFIG_MMC3_CD_PIN="PH0" CONFIG_MMC3_PINS="PH" CONFIG_MMC_SUNXI_SLOT_EXTRA=3 +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" CONFIG_USB0_VBUS_PIN="PB9" CONFIG_USB0_VBUS_DET="PH5" CONFIG_SATAPWR="PC3"
configs/A20-Olimex-SOM204-EVB-eMMC_defconfig +1 -0
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y CONFIG_DRAM_CLK=384 CONFIG_MMC0_CD_PIN="PH1" CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" CONFIG_USB0_VBUS_PIN="PC17" CONFIG_USB0_VBUS_DET="PH5" CONFIG_I2C1_ENABLE=y
configs/Mele_M3_defconfig +1 -0
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y CONFIG_DRAM_CLK=384 CONFIG_MMC0_CD_PIN="PH1" CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" CONFIG_VIDEO_VGA=y CONFIG_VIDEO_COMPOSITE=y CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-m3"
configs/Orangepi_mini_defconfig +1 -0
@@ -7,6 +7,7 @@ CONFIG_MACPWR="PH23" CONFIG_MMC0_CD_PIN="PH10" CONFIG_MMC3_CD_PIN="PH11" CONFIG_MMC_SUNXI_SLOT_EXTRA=3 +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" CONFIG_USB1_VBUS_PIN="PH26" CONFIG_USB2_VBUS_PIN="PH22" CONFIG_VIDEO_COMPOSITE=y
configs/Sinlinx_SinA33_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=552 CONFIG_DRAM_ZQ=15291 CONFIG_MMC0_CD_PIN="PB4" CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" CONFIG_USB0_ID_DET="PH8" CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:18,pclk_khz:66000,le:90,ri:160,up:3,lo:127,hs:70,vs:20,sync:3,vmode:0" CONFIG_VIDEO_LCD_DCLK_PHASE=0
configs/Yones_Toptech_BD1078_defconfig +1 -0
@@ -7,6 +7,7 @@ CONFIG_MMC0_CD_PIN="PH1" CONFIG_MMC1_CD_PIN="PH2" CONFIG_MMC1_PINS="PH" CONFIG_MMC_SUNXI_SLOT_EXTRA=1 +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" CONFIG_USB0_VBUS_PIN="PB9" CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT" CONFIG_AXP_GPIO=y
configs/amarula_a64_relic_defconfig +1 -0
@@ -5,6 +5,7 @@ CONFIG_MACH_SUN50I=y CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y CONFIG_DRAM_ODT_EN=y CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +CONFIG_ENV_FAT_DEVICE_AND_PART="0:auto" # CONFIG_VIDEO_DE2 is not set CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-amarula-relic" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
env/Kconfig +2 -1
@@ -374,7 +374,8 @@ config ENV_FAT_DEVICE_AND_PART default "0:1" if TI_COMMON_CMD_OPTIONS default "0:auto" if ARCH_ZYNQMP default "0:auto" if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1 - default "1:auto" if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1 + default "1:auto" if ARCH_SUNXI && !DM_MMC && MMC_SUNXI_SLOT_EXTRA != -1 + default "2:auto" if ARCH_SUNXI && DM_MMC && MMC_SUNXI_SLOT_EXTRA != -1 default "0" if ARCH_AT91 help Define this to a string to specify the partition of the device. It can
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 27/42 sunxi: Use mmc_bootdev=2 for MMC2 boot
In reply to Jagan TekiWith DM_MMC the mmc devices are probed as per dt status and eMMC can probed maximum device of 2, if all nodes like mmc0, mmc1 and mmc2 status are 'okay'.
So update mmc_bootdev to 2 and add boot order as 2, 1, 0 devices. so-that it can to boot any identified device even if the respective device status disabled or unsupported.
--- board/sunxi/board.c | 2 +- include/configs/sunxi-common.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)
board/sunxi/board.c +1 -1
@@ -775,7 +775,7 @@ int misc_init_r(void) }else if (boot ==BOOT_DEVICE_MMC1 ) {env_set ("mmc_bootdev" ,"0" ); }else if (boot ==BOOT_DEVICE_MMC2 ) { -env_set ("mmc_bootdev" ,"1" ); +env_set ("mmc_bootdev" ,"2" ); }setup_environment (gd->fdt_blob);
include/configs/sunxi-common.h +3 -1
@@ -377,8 +377,10 @@ extern int soft_i2c_gpio_scl;#define BOOTENV_DEV_MMC_AUTO (devtypeu, devtypel, instance) \ BOOTENV_DEV_MMC(MMC, mmc, 0) \ BOOTENV_DEV_MMC(MMC, mmc, 1) \ + BOOTENV_DEV_MMC(MMC, mmc, 2) \ "bootcmd_mmc_auto=" \ - "if test ${mmc_bootdev} -eq 1; then " \ + "if test ${mmc_bootdev} -eq 2; then " \ + "run bootcmd_mmc2; " \ "run bootcmd_mmc1; " \ "run bootcmd_mmc0; " \ "elif test ${mmc_bootdev} -eq 0; then " \
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 28/42 sunxi: A20: Enable DM_MMC
In reply to Jagan TekiEnable DM_MMC for Allwinner A20 SoC.
Tested on A20-OLinuXino-LIME2.
--- arch/arm/mach-sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-sunxi/Kconfig +1 -0
@@ -191,6 +191,7 @@ config MACH_SUN7I select ARCH_SUPPORT_PSCI select CLK select DRAM_SUN4I + select DM_MMC if MMC select PHY_SUN4I_USB select SUNXI_GEN_SUN4I select SUPPORT_SPL
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 29/42 mmc: sunxi: Add mmc, emmc H5/A64 compatible
In reply to Jagan TekiAdded H5, A64 compatible for mmc and emmc.
--- drivers/mmc/sunxi_mmc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mmc/sunxi_mmc.c +2 -0
@@ -697,6 +697,8 @@ static const struct udevice_id sunxi_mmc_ids[] = { { .compatible = "allwinner,sun4i-a10-mmc" }, { .compatible = "allwinner,sun5i-a13-mmc" }, { .compatible = "allwinner,sun7i-a20-mmc" }, + { .compatible = "allwinner,sun50i-a64-mmc" }, + { .compatible = "allwinner,sun50i-a64-emmc" }, { } };
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 30/42 sunxi: H3_H5: Enable DM_MMC
In reply to Jagan TekiEnable DM_MMC for Allwinner H3/H5 SoCs.
Tested on
H3: BPI-M2+
H5: Orangepi pc2, prime, zero+2
--- arch/arm/mach-sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-sunxi/Kconfig +1 -0
@@ -134,6 +134,7 @@ config MACH_SUNXI_H3_H5 bool select CLK select DM_I2C + select DM_MMC if MMC select PHY_SUN4I_USB select SUNXI_DE2 select SUNXI_DRAM_DW
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 31/42 sunxi: A64: Enable DM_MMC
In reply to Jagan TekiEnable DM_MMC for Allwinner A64 SoCs.
Tested on BPI-M64, Amarula A64-Relic
--- arch/arm/mach-sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-sunxi/Kconfig +1 -0
@@ -285,6 +285,7 @@ config MACH_SUN50I select ARM64 select CLK select DM_I2C + select DM_MMC if MMC select PHY_SUN4I_USB select SUNXI_DE2 select SUNXI_GEN_SUN6I
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 32/42 mmc: sunxi: Add A83T emmc compatible
In reply to Jagan TekiAdd emmc compatible for A83T SoC.
--- drivers/mmc/sunxi_mmc.c | 1 + 1 file changed, 1 insertion(+)
drivers/mmc/sunxi_mmc.c +1 -0
@@ -697,6 +697,7 @@ static const struct udevice_id sunxi_mmc_ids[] = { { .compatible = "allwinner,sun4i-a10-mmc" }, { .compatible = "allwinner,sun5i-a13-mmc" }, { .compatible = "allwinner,sun7i-a20-mmc" }, + { .compatible = "allwinner,sun8i-a83t-emmc" }, { .compatible = "allwinner,sun50i-a64-mmc" }, { .compatible = "allwinner,sun50i-a64-emmc" }, { }
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 33/42 sunxi: A83T: Enable DM_MMC
In reply to Jagan TekiEnable DM_MMC for Allwinner A83T SoC.
Tested on BPI-M3.
--- arch/arm/mach-sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-sunxi/Kconfig +1 -0
@@ -230,6 +230,7 @@ config MACH_SUN8I_A83T bool "sun8i (Allwinner A83T)" select CPU_V7A select CLK + select DM_MMC if MMC select DRAM_SUN8I_A83T select PHY_SUN4I_USB select SUNXI_GEN_SUN6I
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 34/42 sunxi: V40: Enable DM_MMC
In reply to Jagan TekiEnable DM_MMC for Allwinner V40 SoC.
Tested on BPI-M2 Ultra, BPI-M2 Berry.
--- arch/arm/mach-sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-sunxi/Kconfig +1 -0
@@ -254,6 +254,7 @@ config MACH_SUN8I_R40 select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI select CLK + select DM_MMC if MMC select SUNXI_GEN_SUN6I select SUPPORT_SPL select SUNXI_DRAM_DW
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 35/42 sunxi: A13/A31: Enable DM_MMC
In reply to Jagan TekiEnable DM_MMC for Allwinner A13/A31 SoC.
--- arch/arm/mach-sunxi/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-sunxi/Kconfig +2 -0
@@ -164,6 +164,7 @@ config MACH_SUN5I select CLK select ARM_CORTEX_CPU_IS_UP select DRAM_SUN4I + select DM_MMC if MMC select PHY_SUN4I_USB select SUNXI_GEN_SUN4I select SUPPORT_SPL
@@ -177,6 +178,7 @@ config MACH_SUN6I select ARCH_SUPPORT_PSCI select CLK select DRAM_SUN6I + select DM_MMC if MMC select PHY_SUN4I_USB select SUN6I_P2WI select SUN6I_PRCM
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 36/42 sunxi: A23/A33/V3S: Enable DM_MMC
In reply to Jagan TekiEnable DM_MMC for Allwinner A23/A33/V3S SoC.
--- arch/arm/mach-sunxi/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-sunxi/Kconfig +3 -0
@@ -207,6 +207,7 @@ config MACH_SUN8I_A23 select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI select CLK + select DM_MMC if MMC select DRAM_SUN8I_A23 select PHY_SUN4I_USB select SUNXI_GEN_SUN6I
@@ -221,6 +222,7 @@ config MACH_SUN8I_A33 select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI select CLK + select DM_MMC if MMC select DRAM_SUN8I_A33 select PHY_SUN4I_USB select SUNXI_GEN_SUN6I
@@ -269,6 +271,7 @@ config MACH_SUN8I_V3S select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI select CLK + select DM_MMC if MMC select SUNXI_GEN_SUN6I select SUNXI_DRAM_DW select SUNXI_DRAM_DW_16BIT
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 37/42 clk: sunxi: Implement SPI clocks
In reply to Jagan TekiImplement SPI AHB and MOD clocks for all Allwinner SoC clock drivers via clock map descriptor table.
--- drivers/clk/sunxi/clk_a10.c | 9 +++++++++ drivers/clk/sunxi/clk_a10s.c | 7 +++++++ drivers/clk/sunxi/clk_a31.c | 9 +++++++++ drivers/clk/sunxi/clk_a64.c | 5 +++++ drivers/clk/sunxi/clk_h3.c | 5 +++++ drivers/clk/sunxi/clk_v3s.c | 3 +++ 6 files changed, 38 insertions(+)
drivers/clk/sunxi/clk_a10.c +9 -0
@@ -22,12 +22,21 @@ static struct ccu_clk_map a10_clks[] = { [CLK_AHB_MMC1] = { 0x060, BIT(9), NULL }, [CLK_AHB_MMC2] = { 0x060, BIT(10), NULL }, [CLK_AHB_MMC3] = { 0x060, BIT(11), NULL }, + [CLK_AHB_SPI0] = { 0x060, BIT(20), NULL }, + [CLK_AHB_SPI1] = { 0x060, BIT(21), NULL }, + [CLK_AHB_SPI2] = { 0x060, BIT(22), NULL }, + [CLK_AHB_SPI3] = { 0x060, BIT(23), NULL }, [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, [CLK_MMC3] = { 0x094, BIT(31), &mmc_clk_set_rate }, + [CLK_SPI0] = { 0x0a0, BIT(31), NULL }, + [CLK_SPI1] = { 0x0a4, BIT(31), NULL }, + [CLK_SPI2] = { 0x0a8, BIT(31), NULL }, + [CLK_SPI3] = { 0x0d4, BIT(31), NULL }, + [CLK_USB_OHCI0] = { 0x0cc, BIT(6), NULL }, [CLK_USB_OHCI1] = { 0x0cc, BIT(7), NULL }, [CLK_USB_PHY] = { 0x0cc, BIT(8), NULL },
drivers/clk/sunxi/clk_a10s.c +7 -0
@@ -19,6 +19,9 @@ static struct ccu_clk_map a10s_clks[] = { [CLK_AHB_MMC0] = { 0x060, BIT(8), NULL }, [CLK_AHB_MMC1] = { 0x060, BIT(9), NULL }, [CLK_AHB_MMC2] = { 0x060, BIT(10), NULL }, + [CLK_AHB_SPI0] = { 0x060, BIT(20), NULL }, + [CLK_AHB_SPI1] = { 0x060, BIT(21), NULL }, + [CLK_AHB_SPI2 ] = {0x060 ,BIT (22 ),NULL }, #ifdef CONFIG_MMC [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate },
@@ -26,6 +29,10 @@ static struct ccu_clk_map a10s_clks[] = { [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, #endif + [CLK_SPI0] = { 0x0a0, BIT(31), NULL }, + [CLK_SPI1] = { 0x0a4, BIT(31), NULL }, + [CLK_SPI2] = { 0x0a8, BIT(31), NULL }, + [CLK_USB_OHCI] = { 0x0cc, BIT(6), NULL }, [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, [CLK_USB_PHY1] = { 0x0cc, BIT(9), NULL },
drivers/clk/sunxi/clk_a31.c +9 -0
@@ -17,6 +17,10 @@ static struct ccu_clk_map a31_clks[] = { [CLK_AHB1_MMC1] = { 0x060, BIT(9), NULL }, [CLK_AHB1_MMC2] = { 0x060, BIT(10), NULL }, [CLK_AHB1_MMC3] = { 0x060, BIT(12), NULL }, + [CLK_AHB1_SPI0] = { 0x060, BIT(20), NULL }, + [CLK_AHB1_SPI1] = { 0x060, BIT(21), NULL }, + [CLK_AHB1_SPI2] = { 0x060, BIT(22), NULL }, + [CLK_AHB1_SPI3] = { 0x060, BIT(23), NULL }, [CLK_AHB1_OTG] = { 0x060, BIT(24), NULL }, [CLK_AHB1_EHCI0] = { 0x060, BIT(26), NULL }, [CLK_AHB1_EHCI1] = { 0x060, BIT(27), NULL },
@@ -29,6 +33,11 @@ static struct ccu_clk_map a31_clks[] = { [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, [CLK_MMC3] = { 0x094, BIT(31), &mmc_clk_set_rate }, + [CLK_SPI0] = { 0x0a0, BIT(31), NULL }, + [CLK_SPI1] = { 0x0a4, BIT(31), NULL }, + [CLK_SPI2] = { 0x0a8, BIT(31), NULL }, + [CLK_SPI3] = { 0x0ac, BIT(31), NULL }, + [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, [CLK_USB_PHY1] = { 0x0cc, BIT(9), NULL }, [CLK_USB_PHY2] = { 0x0cc, BIT(10), NULL },
drivers/clk/sunxi/clk_a64.c +5 -0
@@ -16,6 +16,8 @@ static struct ccu_clk_map a64_clks[] = { [CLK_BUS_MMC0] = { 0x060, BIT(8), NULL }, [CLK_BUS_MMC1] = { 0x060, BIT(9), NULL }, [CLK_BUS_MMC2] = { 0x060, BIT(10), NULL }, + [CLK_BUS_SPI0] = { 0x060, BIT(20), NULL }, + [CLK_BUS_SPI1] = { 0x060, BIT(21), NULL }, [CLK_BUS_OTG] = { 0x060, BIT(23), NULL }, [CLK_BUS_EHCI0] = { 0x060, BIT(24), NULL }, [CLK_BUS_EHCI1] = { 0x060, BIT(25), NULL },
@@ -26,6 +28,9 @@ static struct ccu_clk_map a64_clks[] = { [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, + [CLK_SPI0] = { 0x0a0, BIT(31), NULL }, + [CLK_SPI1] = { 0x0a4, BIT(31), NULL }, + [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, [CLK_USB_PHY1] = { 0x0cc, BIT(9), NULL }, [CLK_USB_HSIC] = { 0x0cc, BIT(10), NULL },
drivers/clk/sunxi/clk_h3.c +5 -0
@@ -16,6 +16,8 @@ static struct ccu_clk_map h3_clks[] = { [CLK_BUS_MMC0] = { 0x060, BIT(8), NULL }, [CLK_BUS_MMC1] = { 0x060, BIT(9), NULL }, [CLK_BUS_MMC2] = { 0x060, BIT(10), NULL }, + [CLK_BUS_SPI0] = { 0x060, BIT(20), NULL }, + [CLK_BUS_SPI1] = { 0x060, BIT(21), NULL }, [CLK_BUS_OTG] = { 0x060, BIT(23), NULL }, [CLK_BUS_EHCI0] = { 0x060, BIT(24), NULL }, [CLK_BUS_EHCI1] = { 0x060, BIT(25), NULL },
@@ -30,6 +32,9 @@ static struct ccu_clk_map h3_clks[] = { [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, + [CLK_SPI0] = { 0x0a0, BIT(31), NULL }, + [CLK_SPI1] = { 0x0a4, BIT(31), NULL }, + [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, [CLK_USB_PHY1] = { 0x0cc, BIT(9), NULL }, [CLK_USB_PHY2] = { 0x0cc, BIT(10), NULL },
drivers/clk/sunxi/clk_v3s.c +3 -0
@@ -16,12 +16,15 @@ static struct ccu_clk_map v3s_clks[] = { [CLK_BUS_MMC0] = { 0x060, BIT(8), NULL }, [CLK_BUS_MMC1] = { 0x060, BIT(9), NULL }, [CLK_BUS_MMC2] = { 0x060, BIT(10), NULL }, + [CLK_BUS_SPI0] = { 0x060, BIT(20), NULL }, [CLK_BUS_OTG] = { 0x060, BIT(24), NULL }, [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate }, + [CLK_SPI0] = { 0x0a0, BIT(31), NULL }, + [CLK_USB_PHY0] = { 0x0cc, BIT(8), NULL }, };
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 38/42 clk: sunxi: Implement SPI resets
In reply to Jagan TekiImplement SPI resets for all relevant Allwinner SoC clock drivers via reset map descriptor table.
--- drivers/clk/sunxi/clk_a31.c | 4 ++++ drivers/clk/sunxi/clk_a64.c | 2 ++ drivers/clk/sunxi/clk_h3.c | 2 ++ drivers/clk/sunxi/clk_v3s.c | 1 + 4 files changed, 9 insertions(+)
drivers/clk/sunxi/clk_a31.c +4 -0
@@ -55,6 +55,10 @@ static struct ccu_reset_map a31_resets[] = { [RST_AHB1_MMC1] = { 0x2c0, BIT(9) }, [RST_AHB1_MMC2] = { 0x2c0, BIT(10) }, [RST_AHB1_MMC3] = { 0x2c0, BIT(11) }, + [RST_AHB1_SPI0] = { 0x2c0, BIT(20) }, + [RST_AHB1_SPI1] = { 0x2c0, BIT(21) }, + [RST_AHB1_SPI2] = { 0x2c0, BIT(22) }, + [RST_AHB1_SPI3] = { 0x2c0, BIT(23) }, [RST_AHB1_OTG] = { 0x2c0, BIT(24) }, [RST_AHB1_EHCI0] = { 0x2c0, BIT(26) }, [RST_AHB1_EHCI1] = { 0x2c0, BIT(27) },
drivers/clk/sunxi/clk_a64.c +2 -0
@@ -47,6 +47,8 @@ static struct ccu_reset_map a64_resets[] = { [RST_BUS_MMC0] = { 0x2c0, BIT(8) }, [RST_BUS_MMC1] = { 0x2c0, BIT(9) }, [RST_BUS_MMC2] = { 0x2c0, BIT(10) }, + [RST_BUS_SPI0] = { 0x2c0, BIT(20) }, + [RST_BUS_SPI1] = { 0x2c0, BIT(21) }, [RST_BUS_OTG] = { 0x2c0, BIT(23) }, [RST_BUS_EHCI0] = { 0x2c0, BIT(24) }, [RST_BUS_EHCI1] = { 0x2c0, BIT(25) },
drivers/clk/sunxi/clk_h3.c +2 -0
@@ -54,6 +54,8 @@ static struct ccu_reset_map h3_resets[] = { [RST_BUS_MMC0] = { 0x2c0, BIT(8) }, [RST_BUS_MMC1] = { 0x2c0, BIT(9) }, [RST_BUS_MMC2] = { 0x2c0, BIT(10) }, + [RST_BUS_SPI0] = { 0x2c0, BIT(20) }, + [RST_BUS_SPI1] = { 0x2c0, BIT(21) }, [RST_BUS_OTG] = { 0x2c0, BIT(23) }, [RST_BUS_EHCI0] = { 0x2c0, BIT(24) }, [RST_BUS_EHCI1] = { 0x2c0, BIT(25) },
drivers/clk/sunxi/clk_v3s.c +1 -0
@@ -34,6 +34,7 @@ static struct ccu_reset_map v3s_resets[] = { [RST_BUS_MMC0] = { 0x2c0, BIT(8) }, [RST_BUS_MMC1] = { 0x2c0, BIT(9) }, [RST_BUS_MMC2] = { 0x2c0, BIT(10) }, + [RST_BUS_SPI0] = { 0x2c0, BIT(20) }, [RST_BUS_OTG] = { 0x2c0, BIT(24) }, };
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 39/42 spi: sun4i: Add CLK support
In reply to Jagan TekiAdd CLK support to enable AHB and MOD SPI clocks
on sun4i_spi driver.
--- drivers/spi/sun4i_spi.c | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-)
drivers/spi/sun4i_spi.c +34 -6
@@ -19,6 +19,7 @@*/ #include <common.h> +#include <clk.h> #include <dm.h> #include <spi.h> #include <errno.h>
@@ -238,13 +239,36 @@ static int sun4i_spi_parse_pins(struct udevice *dev)return 0 ; } -static inline void sun4i_spi_enable_clock (void ) +static inline int sun4i_spi_enable_clock (struct udevice *dev) { -struct sunxi_ccm_reg *const ccm = - (struct sunxi_ccm_reg *const )SUNXI_CCM_BASE ; +struct clk ahb_clk, mod_clk; +int ret; + + ret =clk_get_by_name (dev,"ahb" , &ahb_clk); +if (ret) { +dev_err (dev,"falied to get ahb clock\n" ); +return ret; + } + + ret =clk_get_by_name (dev,"mod" , &mod_clk); +if (ret) { +dev_err (dev,"falied to get mod clock\n" ); +return ret; + } + + ret =clk_enable (&ahb_clk); +if (ret) { +dev_err (dev,"failed to enable ahb clock\n" ); +return ret; + } + + ret =clk_enable (&mod_clk); +if (ret) { +dev_err (dev,"failed to enable mod clock\n" ); +return ret; + } -setbits_le32 (&ccm->ahb_gate0, (1 <<AHB_GATE_OFFSET_SPI0 )); -writel ((1 <<31 ), &ccm->spi0_clk_cfg); +return 0 ; }static int sun4i_spi_ofdata_to_platdata (struct udevice *bus)
@@ -267,8 +291,12 @@ static int sun4i_spi_probe(struct udevice *bus) {struct sun4i_spi_platdata *plat =dev_get_platdata (bus);struct sun4i_spi_priv *priv =dev_get_priv (bus); +int ret; + + ret =sun4i_spi_enable_clock (bus); +if (ret) +return ret; -sun4i_spi_enable_clock ();sun4i_spi_parse_pins (bus); priv->regs = (struct sun4i_spi_regs *)(uintptr_t )plat->base_addr;
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 40/42 spi: Add Allwinner A31 SPI driver
In reply to Jagan TekiAdd Allwinner sun6i SPI driver for A31, H3/H5 an A64.
--- drivers/spi/Kconfig | 6 + drivers/spi/Makefile | 1 + drivers/spi/sun6i_spi.c | 475 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 482 insertions(+) create mode 100644 drivers/spi/sun6i_spi.c
drivers/spi/Kconfig +6 -0
@@ -179,6 +179,12 @@ config SUN4I_SPI help SPI driver for Allwinner sun4i, sun5i and sun7i SoCs +config SUN6I_SPI + bool "Allwinner A31 SPI controller" + depends on ARCH_SUNXI + help + This enables using the SPI controller on the Allwinner A31 SoCs. + config TEGRA114_SPI bool "nVidia Tegra114 SPI driver" help
drivers/spi/Makefile +1 -0
@@ -45,6 +45,7 @@ obj-$(CONFIG_SH_SPI) += sh_spi.o obj-$(CONFIG_SH_QSPI) += sh_qspi.o obj-$(CONFIG_STM32_QSPI) += stm32_qspi.o obj-$(CONFIG_SUN4I_SPI) += sun4i_spi.o +obj-$(CONFIG_SUN6I_SPI) += sun6i_spi.o obj-$(CONFIG_TEGRA114_SPI) += tegra114_spi.o obj-$(CONFIG_TEGRA20_SFLASH) += tegra20_sflash.o obj-$(CONFIG_TEGRA20_SLINK) += tegra20_slink.o
drivers/spi/sun6i_spi.c new file +475 -0
475 lines not on this page · raw message
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 41/42 clk: sunxi: Implement UART clocks
In reply to Jagan TekiImplement UART clocks for all Allwinner SoC
clock drivers via clock map descriptor table.
--- drivers/clk/sunxi/clk_a10.c | 9 +++++++++ drivers/clk/sunxi/clk_a10s.c | 5 +++++ drivers/clk/sunxi/clk_a23.c | 6 ++++++ drivers/clk/sunxi/clk_a31.c | 7 +++++++ drivers/clk/sunxi/clk_a64.c | 6 ++++++ drivers/clk/sunxi/clk_a83t.c | 6 ++++++ drivers/clk/sunxi/clk_h3.c | 5 +++++ drivers/clk/sunxi/clk_r40.c | 9 +++++++++ drivers/clk/sunxi/clk_v3s.c | 4 ++++ 9 files changed, 57 insertions(+)
drivers/clk/sunxi/clk_a10.c +9 -0
@@ -27,6 +27,15 @@ static struct ccu_clk_map a10_clks[] = { [CLK_AHB_SPI2] = { 0x060, BIT(22), NULL }, [CLK_AHB_SPI3] = { 0x060, BIT(23), NULL }, + [CLK_APB1_UART0] = { 0x06c, BIT(16), NULL }, + [CLK_APB1_UART1] = { 0x06c, BIT(17), NULL }, + [CLK_APB1_UART2] = { 0x06c, BIT(18), NULL }, + [CLK_APB1_UART3] = { 0x06c, BIT(19), NULL }, + [CLK_APB1_UART4] = { 0x06c, BIT(20), NULL }, + [CLK_APB1_UART5] = { 0x06c, BIT(21), NULL }, + [CLK_APB1_UART6] = { 0x06c, BIT(22), NULL }, + [CLK_APB1_UART7] = { 0x06c, BIT(23), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate },
drivers/clk/sunxi/clk_a10s.c +5 -0
@@ -23,6 +23,11 @@ static struct ccu_clk_map a10s_clks[] = { [CLK_AHB_SPI1] = { 0x060, BIT(21), NULL }, [CLK_AHB_SPI2] = { 0x060, BIT(22), NULL }, + [CLK_APB1_UART0] = { 0x06c, BIT(16), NULL }, + [CLK_APB1_UART1] = { 0x06c, BIT(17), NULL }, + [CLK_APB1_UART2] = { 0x06c, BIT(18), NULL }, + [CLK_APB1_UART3 ] = {0x06c ,BIT (19 ),NULL }, + #ifdef CONFIG_MMC [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate },
drivers/clk/sunxi/clk_a23.c +6 -0
@@ -20,6 +20,12 @@ static struct ccu_clk_map a23_clks[] = { [CLK_BUS_EHCI] = { 0x060, BIT(26), NULL }, [CLK_BUS_OHCI] = { 0x060, BIT(29), NULL }, + [CLK_BUS_UART0] = { 0x06c, BIT(16), NULL }, + [CLK_BUS_UART1] = { 0x06c, BIT(17), NULL }, + [CLK_BUS_UART2] = { 0x06c, BIT(18), NULL }, + [CLK_BUS_UART3] = { 0x06c, BIT(19), NULL }, + [CLK_BUS_UART4 ] = {0x06c ,BIT (20 ),NULL }, + #ifdef CONFIG_MMC [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate },
drivers/clk/sunxi/clk_a31.c +7 -0
@@ -28,6 +28,13 @@ static struct ccu_clk_map a31_clks[] = { [CLK_AHB1_OHCI1] = { 0x060, BIT(30), NULL }, [CLK_AHB1_OHCI2] = { 0x060, BIT(31), NULL }, + [CLK_APB2_UART0] = { 0x06c, BIT(16), NULL }, + [CLK_APB2_UART1] = { 0x06c, BIT(17), NULL }, + [CLK_APB2_UART2] = { 0x06c, BIT(18), NULL }, + [CLK_APB2_UART3] = { 0x06c, BIT(19), NULL }, + [CLK_APB2_UART4] = { 0x06c, BIT(20), NULL }, + [CLK_APB2_UART5] = { 0x06c, BIT(21), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate },
drivers/clk/sunxi/clk_a64.c +6 -0
@@ -24,6 +24,12 @@ static struct ccu_clk_map a64_clks[] = { [CLK_BUS_OHCI0] = { 0x060, BIT(28), NULL }, [CLK_BUS_OHCI1] = { 0x060, BIT(29), NULL }, + [CLK_BUS_UART0] = { 0x06c, BIT(16), NULL }, + [CLK_BUS_UART1] = { 0x06c, BIT(17), NULL }, + [CLK_BUS_UART2] = { 0x06c, BIT(18), NULL }, + [CLK_BUS_UART3] = { 0x06c, BIT(19), NULL }, + [CLK_BUS_UART4] = { 0x06c, BIT(20), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate },
drivers/clk/sunxi/clk_a83t.c +6 -0
@@ -21,6 +21,12 @@ static struct ccu_clk_map a83t_clks[] = { [CLK_BUS_EHCI1] = { 0x060, BIT(27), NULL }, [CLK_BUS_OHCI0] = { 0x060, BIT(29), NULL }, + [CLK_BUS_UART0] = { 0x06c, BIT(16), NULL }, + [CLK_BUS_UART1] = { 0x06c, BIT(17), NULL }, + [CLK_BUS_UART2] = { 0x06c, BIT(18), NULL }, + [CLK_BUS_UART3] = { 0x06c, BIT(19), NULL }, + [CLK_BUS_UART4] = { 0x06c, BIT(20), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate },
drivers/clk/sunxi/clk_h3.c +5 -0
@@ -28,6 +28,11 @@ static struct ccu_clk_map h3_clks[] = { [CLK_BUS_OHCI2] = { 0x060, BIT(30), NULL }, [CLK_BUS_OHCI3] = { 0x060, BIT(31), NULL }, + [CLK_BUS_UART0] = { 0x06c, BIT(16), NULL }, + [CLK_BUS_UART1] = { 0x06c, BIT(17), NULL }, + [CLK_BUS_UART2] = { 0x06c, BIT(18), NULL }, + [CLK_BUS_UART3] = { 0x06c, BIT(19), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate },
drivers/clk/sunxi/clk_r40.c +9 -0
@@ -25,6 +25,15 @@ static struct ccu_clk_map r40_clks[] = { [CLK_BUS_OHCI1] = { 0x060, BIT(30), NULL }, [CLK_BUS_OHCI2] = { 0x060, BIT(31), NULL }, + [CLK_BUS_UART0] = { 0x06c, BIT(16), NULL }, + [CLK_BUS_UART1] = { 0x06c, BIT(17), NULL }, + [CLK_BUS_UART2] = { 0x06c, BIT(18), NULL }, + [CLK_BUS_UART3] = { 0x06c, BIT(19), NULL }, + [CLK_BUS_UART4] = { 0x06c, BIT(20), NULL }, + [CLK_BUS_UART5] = { 0x06c, BIT(21), NULL }, + [CLK_BUS_UART6] = { 0x06c, BIT(22), NULL }, + [CLK_BUS_UART7] = { 0x06c, BIT(23), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate },
drivers/clk/sunxi/clk_v3s.c +4 -0
@@ -19,6 +19,10 @@ static struct ccu_clk_map v3s_clks[] = { [CLK_BUS_SPI0] = { 0x060, BIT(20), NULL }, [CLK_BUS_OTG] = { 0x060, BIT(24), NULL }, + [CLK_BUS_UART0] = { 0x06c, BIT(16), NULL }, + [CLK_BUS_UART1] = { 0x06c, BIT(17), NULL }, + [CLK_BUS_UART2] = { 0x06c, BIT(18), NULL }, + [CLK_MMC0] = { 0x088, BIT(31), &mmc_clk_set_rate }, [CLK_MMC1] = { 0x08c, BIT(31), &mmc_clk_set_rate }, [CLK_MMC2] = { 0x090, BIT(31), &mmc_clk_set_rate },
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 42/42 clk: sunxi: Implement UART resets
In reply to Jagan TekiImplement UART resets for all relevant Allwinner SoC clock drivers via reset map descriptor table.
--- drivers/clk/sunxi/clk_a23.c | 6 ++++++ drivers/clk/sunxi/clk_a31.c | 7 +++++++ drivers/clk/sunxi/clk_a64.c | 6 ++++++ drivers/clk/sunxi/clk_a83t.c | 6 ++++++ drivers/clk/sunxi/clk_h3.c | 5 +++++ drivers/clk/sunxi/clk_r40.c | 9 +++++++++ drivers/clk/sunxi/clk_v3s.c | 4 ++++ 7 files changed, 43 insertions(+)
drivers/clk/sunxi/clk_a23.c +6 -0
@@ -50,6 +50,12 @@ static struct ccu_reset_map a23_resets[] = { [RST_BUS_OTG] = { 0x2c0, BIT(24) }, [RST_BUS_EHCI] = { 0x2c0, BIT(26) }, [RST_BUS_OHCI] = { 0x2c0, BIT(29) }, + + [RST_BUS_UART0] = { 0x2d8, BIT(16) }, + [RST_BUS_UART1] = { 0x2d8, BIT(17) }, + [RST_BUS_UART2] = { 0x2d8, BIT(18) }, + [RST_BUS_UART3] = { 0x2d8, BIT(19) }, + [RST_BUS_UART4] = { 0x2d8, BIT(20) }, };static const struct ccu_desc sun8i_a23_ccu_desc = {
drivers/clk/sunxi/clk_a31.c +7 -0
@@ -72,6 +72,13 @@ static struct ccu_reset_map a31_resets[] = { [RST_AHB1_OHCI0] = { 0x2c0, BIT(29) }, [RST_AHB1_OHCI1] = { 0x2c0, BIT(30) }, [RST_AHB1_OHCI2] = { 0x2c0, BIT(31) }, + + [RST_APB2_UART0] = { 0x2d8, BIT(16) }, + [RST_APB2_UART1] = { 0x2d8, BIT(17) }, + [RST_APB2_UART2] = { 0x2d8, BIT(18) }, + [RST_APB2_UART3] = { 0x2d8, BIT(19) }, + [RST_APB2_UART4] = { 0x2d8, BIT(20) }, + [RST_APB2_UART5] = { 0x2d8, BIT(21) }, };static const struct ccu_desc sun6i_a31_ccu_desc = {
drivers/clk/sunxi/clk_a64.c +6 -0
@@ -60,6 +60,12 @@ static struct ccu_reset_map a64_resets[] = { [RST_BUS_EHCI1] = { 0x2c0, BIT(25) }, [RST_BUS_OHCI0] = { 0x2c0, BIT(28) }, [RST_BUS_OHCI1] = { 0x2c0, BIT(29) }, + + [RST_BUS_UART0] = { 0x2d8, BIT(16) }, + [RST_BUS_UART1] = { 0x2d8, BIT(17) }, + [RST_BUS_UART2] = { 0x2d8, BIT(18) }, + [RST_BUS_UART3] = { 0x2d8, BIT(19) }, + [RST_BUS_UART4] = { 0x2d8, BIT(20) }, };static const struct ccu_desc sun50i_a64_ccu_desc = {
drivers/clk/sunxi/clk_a83t.c +6 -0
@@ -50,6 +50,12 @@ static struct ccu_reset_map a83t_resets[] = { [RST_BUS_EHCI0] = { 0x2c0, BIT(26) }, [RST_BUS_EHCI1] = { 0x2c0, BIT(27) }, [RST_BUS_OHCI0] = { 0x2c0, BIT(29) }, + + [RST_BUS_UART0] = { 0x2d8, BIT(16) }, + [RST_BUS_UART1] = { 0x2d8, BIT(17) }, + [RST_BUS_UART2] = { 0x2d8, BIT(18) }, + [RST_BUS_UART3] = { 0x2d8, BIT(19) }, + [RST_BUS_UART4] = { 0x2d8, BIT(20) }, };static const struct ccu_desc sun8i_a83t_ccu_desc = {
drivers/clk/sunxi/clk_h3.c +5 -0
@@ -70,6 +70,11 @@ static struct ccu_reset_map h3_resets[] = { [RST_BUS_OHCI1] = { 0x2c0, BIT(29) }, [RST_BUS_OHCI2] = { 0x2c0, BIT(30) }, [RST_BUS_OHCI3] = { 0x2c0, BIT(31) }, + + [RST_BUS_UART0] = { 0x2d8, BIT(16) }, + [RST_BUS_UART1] = { 0x2d8, BIT(17) }, + [RST_BUS_UART2] = { 0x2d8, BIT(18) }, + [RST_BUS_UART3] = { 0x2d8, BIT(19) }, };static const struct ccu_desc sun8i_h3_ccu_desc = {
drivers/clk/sunxi/clk_r40.c +9 -0
@@ -63,6 +63,15 @@ static struct ccu_reset_map r40_resets[] = { [RST_BUS_OHCI0] = { 0x2c0, BIT(29) }, [RST_BUS_OHCI1] = { 0x2c0, BIT(30) }, [RST_BUS_OHCI2] = { 0x2c0, BIT(31) }, + + [RST_BUS_UART0] = { 0x2d8, BIT(16) }, + [RST_BUS_UART1] = { 0x2d8, BIT(17) }, + [RST_BUS_UART2] = { 0x2d8, BIT(18) }, + [RST_BUS_UART3] = { 0x2d8, BIT(19) }, + [RST_BUS_UART4] = { 0x2d8, BIT(20) }, + [RST_BUS_UART5] = { 0x2d8, BIT(21) }, + [RST_BUS_UART6] = { 0x2d8, BIT(22) }, + [RST_BUS_UART7] = { 0x2d8, BIT(23) }, };static const struct ccu_desc sun8i_r40_ccu_desc = {
drivers/clk/sunxi/clk_v3s.c +4 -0
@@ -40,6 +40,10 @@ static struct ccu_reset_map v3s_resets[] = { [RST_BUS_MMC2] = { 0x2c0, BIT(10) }, [RST_BUS_SPI0] = { 0x2c0, BIT(20) }, [RST_BUS_OTG] = { 0x2c0, BIT(24) }, + + [RST_BUS_UART0] = { 0x2d8, BIT(16) }, + [RST_BUS_UART1] = { 0x2d8, BIT(17) }, + [RST_BUS_UART2] = { 0x2d8, BIT(18) }, };static const struct ccu_desc sun8i_v3s_ccu_desc = {
Signature · 1 line
2.18.0.321.gffc6fa0e3