MAINTAINERS: MediaTek: add MediaTek team in the entry
Subsystems (5)
PATCH 1/3 MAINTAINERS: MediaTek: add MediaTek team in the entry
Add MediaTek team as designated reviewer.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -195,6 +195,7 @@ F: arch/arm/include/asm/arch-pxa/ ARM MEDIATEK M: Ryder Lee <[email protected]> M: Weijie Gao <[email protected]> +R: GSS_MTK_Uboot_upstream <[email protected]> S: Maintained F: arch/arm/mach-mediatek/ F: arch/arm/include/asm/arch-mediatek/
Signature · 1 line
2.18.0
PATCH 2/3 ARM: dts: add hifsys reset for MediaTek SoCs
This adds missing hifsys reset parts in header files.
--- arch/arm/dts/mt7623.dtsi | 7 +++++++ include/dt-bindings/reset/mtk-reset.h | 9 +++++++++ 2 files changed, 16 insertions(+)
arch/arm/dts/mt7623.dtsi +7 -0
@@ -248,6 +248,13 @@ status = "disabled"; }; + hifsys: syscon at 1a000000 { + compatible = "mediatek,mt7623-hifsys", "syscon"; + reg = <0x1a000000 0x1000>; + #clock-cells = <1>; + #reset-cells = <1>; + }; + ethsys: syscon at 1b000000 { compatible = "mediatek,mt7623-ethsys", "syscon"; reg = <0x1b000000 0x1000>;
include/dt-bindings/reset/mtk-reset.h +9 -0
@@ -15,4 +15,13 @@#define ETHSYS_MCM_RST 2#define ETHSYS_SYS_RST 0 +/* HIFSYS resets */ +#define HIFSYS_PCIE2_RST 26 +#define HIFSYS_PCIE1_RST 25 +#define HIFSYS_PCIE0_RST 24 +#define HIFSYS_UPHY1_RST 22 +#define HIFSYS_UPHY0_RST 21 +#define HIFSYS_UHOST1_RST 4 +#define HIFSYS_UHOST0_RST 3 +#endif /* _DT_BINDINGS_MTK_RESET_H_ */
Signature · 1 line
2.18.0
PATCH 2/3 ARM: dts: add hifsys reset for MediaTek SoCs
Quoted 4 lines · Ryder Lee
This adds missing hifsys reset parts in header files.
Tested-by Frank Wunderlich <[email protected]>Signed-off-by Ryder Lee <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190807/b859c91b/attachment.sig>
PATCH 3/3 clk: MediaTek: add hifsys entry for MT7623 SoC.
In reply to Ryder LeeThis adds high speed interface subsystem - hifsys (i.e. PCIe and USB) for MT7623 SoC and enables its reset controller.
The control block is shared with ethsys and accordingly rename the related defines.
--- drivers/clk/mediatek/clk-mt7623.c | 68 ++++++++++++++++++++++--------- drivers/clk/mediatek/clk-mt7629.c | 4 +- drivers/clk/mediatek/clk-mtk.h | 2 +- 3 files changed, 51 insertions(+), 23 deletions(-)
drivers/clk/mediatek/clk-mt7623.c +48 -20
@@ -691,34 +691,42 @@ static const struct mtk_gate peri_cgs[] = { GATE_PERI1(CLK_PERI_FCI, CLK_TOP_MS_CARD_SEL, 11), }; -/* ethsys */ -static const struct mtk_gate_regs eth_cg_regs = { +/* ethsys and hifsys */ +static const struct mtk_gate_regs eth_hif_cg_regs = { .sta_ofs =0x30 , }; -#define GATE_ETH (_id, _parent, _shift, _flag) { \ +#define GATE_ETH_HIF (_id, _parent, _shift, _flag) { \ .id = _id, \ .parent = _parent, \ - .regs = ð_cg_regs, \ + .regs = ð_hif_cg_regs, \ .shift = _shift, \ .flags = CLK_GATE_NO_SETCLR_INV | (_flag), \ } -#define GATE_ETH0 (_id, _parent, _shift) \ - GATE_ETH(_id, _parent, _shift, CLK_PARENT_APMIXED) +#define GATE_ETH_HIF0 (_id, _parent, _shift) \ + GATE_ETH_HIF(_id, _parent, _shift, CLK_PARENT_APMIXED) -#define GATE_ETH1 (_id, _parent, _shift) \ - GATE_ETH(_id, _parent, _shift, CLK_PARENT_TOPCKGEN) +#define GATE_ETH_HIF1 (_id, _parent, _shift) \ + GATE_ETH_HIF(_id, _parent, _shift, CLK_PARENT_TOPCKGEN)static const struct mtk_gate eth_cgs[] = { -GATE_ETH1 (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M ,24 ), +GATE_ETH_HIF1 (CLK_HIFSYS_PCIE1 ,CLK_TOP_ETHPLL_500M ,25 ), +GATE_ETH_HIF1 (CLK_HIFSYS_PCIE2 ,CLK_TOP_ETHPLL_500M ,26 ), };static const struct mtk_clk_tree mt7623_clk_tree = {
@@ -778,19 +786,24 @@ static int mt7623_pericfg_probe(struct udevice *dev)return mtk_common_clk_gate_init (dev, &mt7623_clk_tree, peri_cgs); } +static int mt7623_hifsys_probe (struct udevice *dev) +{ +return mtk_common_clk_gate_init (dev, &mt7623_clk_tree, hif_cgs); +} +static int mt7623_ethsys_probe (struct udevice *dev) {return mtk_common_clk_gate_init (dev, &mt7623_clk_tree, eth_cgs); } -static int mt7623_ethsys_bind (struct udevice *dev) +static int mt7623_ethsys_hifsys_bind (struct udevice *dev) {int ret =0 ;#if CONFIG_IS_ENABLED (RESET_MEDIATEK ) - ret =mediatek_reset_bind (dev,ETHSYS_RST_CTRL_OFS ,1 ); + ret =mediatek_reset_bind (dev,ETHSYS_HIFSYS_RST_CTRL_OFS ,1 );if (ret) -debug ("Warning: failed to bind ethsys reset controller\n" ); +debug ("Warning: failed to bind reset controller\n" );#endif return ret;
@@ -821,6 +834,11 @@ static const struct udevice_id mt7623_ethsys_compat[] = { { } }; +static const struct udevice_id mt7623_hifsys_compat[] = { + { .compatible ="mediatek,mt7623-hifsys" }, + { } +}; +static const struct udevice_id mt7623_mcucfg_compat[] = { { .compatible ="mediatek,mt7623-mcucfg" }, { }
@@ -874,12 +892,22 @@ U_BOOT_DRIVER(mtk_clk_pericfg) = { .flags = DM_FLAG_PRE_RELOC, }; +U_BOOT_DRIVER (mtk_clk_hifsys) = { + .name ="mt7623-clock-hifsys" , + .id =UCLASS_CLK , + .of_match = mt7623_hifsys_compat, + .probe = mt7623_hifsys_probe, + .bind = mt7623_ethsys_hifsys_bind, + .priv_auto_alloc_size =sizeof (struct mtk_cg_priv ), + .ops = &mtk_clk_gate_ops, +}; +U_BOOT_DRIVER (mtk_clk_ethsys) = { .name ="mt7623-clock-ethsys" , .id =UCLASS_CLK , .of_match = mt7623_ethsys_compat, .probe = mt7623_ethsys_probe, - .bind = mt7623_ethsys_bind, + .bind = mt7623_ethsys_hifsys_bind, .priv_auto_alloc_size =sizeof (struct mtk_cg_priv ), .ops = &mtk_clk_gate_ops, };
drivers/clk/mediatek/clk-mt7629.c +2 -2
@@ -608,9 +608,9 @@ static int mt7629_ethsys_bind(struct udevice *dev)int ret =0 ;#if CONFIG_IS_ENABLED (RESET_MEDIATEK ) - ret =mediatek_reset_bind (dev,ETHSYS_RST_CTRL_OFS ,1 ); + ret =mediatek_reset_bind (dev,ETHSYS_HIFSYS_RST_CTRL_OFS ,1 );if (ret) -debug ("Warning: failed to bind ethsys reset controller\n" ); +debug ("Warning: failed to bind reset controller\n" );#endif return ret;
drivers/clk/mediatek/clk-mtk.h +1 -1
@@ -23,7 +23,7 @@#define CLK_PARENT_TOPCKGEN BIT(5)#define CLK_PARENT_MASK GENMASK(5, 4) -#define ETHSYS_RST_CTRL_OFS 0x34 +#define ETHSYS_HIFSYS_RST_CTRL_OFS 0x34/* struct mtk_pll_data - hardware-specific PLLs data */ struct mtk_pll_data {
Signature · 1 line
2.18.0
PATCH 3/3 clk: MediaTek: add hifsys entry for MT7623 SoC.
Quoted 8 lines · Ryder Lee
This adds high speed interface subsystem - hifsys (i.e. PCIe and USB) for MT7623 SoC and enables its reset controller.
The control block is shared with ethsys and accordingly rename the related defines.
Tested-by Frank Wunderlich <[email protected]>Signed-off-by Ryder Lee <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190807/3698727f/attachment.sig>
PATCH 1/3 MAINTAINERS: MediaTek: add MediaTek team in the entry
In reply to Ryder LeeQuoted 3 lines · Ryder Lee
Add MediaTek team as designated reviewer.
Signed-off-by Ryder Lee <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190807/cd7fbd21/attachment.sig>