Compile-tested on: ramips/mt7621, x86/64.
Run-tested on: ramips/mt7621.
Signed-off-by: Stijn Segers <foss@volatilesystems.org>
LINUX_VERSION-3.18 = .71
LINUX_VERSION-4.4 = .121
LINUX_VERSION-4.9 = .110
-LINUX_VERSION-4.14 = .50
+LINUX_VERSION-4.14 = .52
LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
LINUX_KERNEL_HASH-4.9.110 = 379a143a70a79f0eea6c9f6638942b65e6043abdde17ad23264c0abd93c4ea7a
-LINUX_KERNEL_HASH-4.14.50 = 703a8d013b25dc428d936f72858fa0c702c22cb3114a040fb9bb47562e4ea2ac
+LINUX_KERNEL_HASH-4.14.52 = a5d226c7b2fd1eb0f01d56e4e2c6a0100784b68df907cc7317f32bde34f88810
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
{
--- a/net/ipv6/netfilter/Kconfig
+++ b/net/ipv6/netfilter/Kconfig
-@@ -71,6 +71,14 @@ config NFT_FIB_IPV6
+@@ -99,6 +99,14 @@ config NFT_FIB_IPV6
endif # NF_TABLES_IPV6
endif # NF_TABLES
--- a/net/ipv6/netfilter/Kconfig
+++ b/net/ipv6/netfilter/Kconfig
-@@ -72,8 +72,9 @@ endif # NF_TABLES_IPV6
+@@ -100,8 +100,9 @@ endif # NF_TABLES_IPV6
endif # NF_TABLES
config NF_FLOW_TABLE_IPV6
--- a/net/ipv6/netfilter/Kconfig
+++ b/net/ipv6/netfilter/Kconfig
-@@ -73,8 +73,7 @@ endif # NF_TABLES
+@@ -101,8 +101,7 @@ endif # NF_TABLES
config NF_FLOW_TABLE_IPV6
tristate "Netfilter flow table IPv6 module"
depends on !NF_CONNTRACK || NF_CONNTRACK
--- a/net/ipv6/netfilter/Kconfig
+++ b/net/ipv6/netfilter/Kconfig
-@@ -69,7 +69,6 @@ config NFT_FIB_IPV6
+@@ -97,7 +97,6 @@ config NFT_FIB_IPV6
multicast or blackhole.
endif # NF_TABLES_IPV6
config NF_FLOW_TABLE_IPV6
tristate "Netfilter flow table IPv6 module"
-@@ -79,6 +78,8 @@ config NF_FLOW_TABLE_IPV6
+@@ -107,6 +106,8 @@ config NF_FLOW_TABLE_IPV6
To compile it as a module, choose M here.
net/netfilter/xt_FLOWOFFLOAD.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
-diff --git a/net/netfilter/xt_FLOWOFFLOAD.c b/net/netfilter/xt_FLOWOFFLOAD.c
-index ab6259e..3bea08e 100644
--- a/net/netfilter/xt_FLOWOFFLOAD.c
+++ b/net/netfilter/xt_FLOWOFFLOAD.c
-@@ -337,10 +337,41 @@ static void xt_flowoffload_table_cleanup(struct nf_flowtable *table)
+@@ -337,10 +337,41 @@ static void xt_flowoffload_table_cleanup
nf_flow_table_free(table);
}
INIT_DELAYED_WORK(&hook_work, xt_flowoffload_hook_work);
ret = xt_flowoffload_table_init(&nf_flowtable);
-@@ -358,6 +389,7 @@ static void __exit xt_flowoffload_tg_exit(void)
+@@ -358,6 +389,7 @@ static void __exit xt_flowoffload_tg_exi
{
xt_unregister_target(&offload_tg_reg);
xt_flowoffload_table_cleanup(&nf_flowtable);
}
MODULE_LICENSE("GPL");
---
-2.17.0
-
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
-@@ -6147,7 +6147,7 @@ static void __ref alloc_node_mem_map(str
+@@ -6146,7 +6146,7 @@ static void __ref alloc_node_mem_map(str
mem_map = NODE_DATA(0)->node_mem_map;
#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
static const struct rt6_info ip6_blk_hole_entry_template = {
.dst = {
.__refcnt = ATOMIC_INIT(1),
-@@ -2046,6 +2063,11 @@ static struct rt6_info *ip6_route_info_c
+@@ -2043,6 +2060,11 @@ static struct rt6_info *ip6_route_info_c
rt->dst.output = ip6_pkt_prohibit_out;
rt->dst.input = ip6_pkt_prohibit;
break;
case RTN_THROW:
case RTN_UNREACHABLE:
default:
-@@ -2771,6 +2793,17 @@ static int ip6_pkt_prohibit_out(struct n
+@@ -2768,6 +2790,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
/*
* Allocate a dst for local (unicast / anycast) address.
*/
-@@ -3007,7 +3040,8 @@ static int rtm_to_fib6_config(struct sk_
+@@ -3004,7 +3037,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
-@@ -3497,6 +3531,9 @@ static int rt6_fill_node(struct net *net
+@@ -3494,6 +3528,9 @@ static int rt6_fill_node(struct net *net
case -EACCES:
rtm->rtm_type = RTN_PROHIBIT;
break;
case -EAGAIN:
rtm->rtm_type = RTN_THROW;
break;
-@@ -3815,6 +3852,8 @@ static int ip6_route_dev_notify(struct n
+@@ -3812,6 +3849,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
-@@ -3826,6 +3865,7 @@ static int ip6_route_dev_notify(struct n
+@@ -3823,6 +3862,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif
}
-@@ -4042,6 +4082,17 @@ static int __net_init ip6_route_net_init
+@@ -4039,6 +4079,17 @@ static int __net_init ip6_route_net_init
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true);
#endif
net->ipv6.sysctl.flush_delay = 0;
-@@ -4060,6 +4111,8 @@ out:
+@@ -4057,6 +4108,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
-@@ -4077,6 +4130,7 @@ static void __net_exit ip6_route_net_exi
+@@ -4074,6 +4127,7 @@ static void __net_exit ip6_route_net_exi
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
kfree(net->ipv6.ip6_blk_hole_entry);
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
}
-@@ -4150,6 +4204,9 @@ void __init ip6_route_init_special_entri
+@@ -4147,6 +4201,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
/**
* ata_build_rw_tf - Build ATA taskfile for given read/write request
* @tf: Target ATA taskfile
-@@ -5120,6 +5133,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -5117,6 +5130,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
if (tag < 0)
return NULL;
}
qc = __ata_qc_from_tag(ap, tag);
qc->tag = tag;
-@@ -6021,6 +6037,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -6018,6 +6034,9 @@ struct ata_port *ata_port_alloc(struct a
ap->stats.unhandled_irq = 1;
ap->stats.idle_irq = 1;
#endif
ata_sff_port_init(ap);
return ap;
-@@ -6042,6 +6061,12 @@ static void ata_host_release(struct devi
+@@ -6039,6 +6058,12 @@ static void ata_host_release(struct devi
kfree(ap->pmp_link);
kfree(ap->slave_link);
kfree(ap);
host->ports[i] = NULL;
}
-@@ -6488,7 +6513,23 @@ int ata_host_register(struct ata_host *h
+@@ -6485,7 +6510,23 @@ int ata_host_register(struct ata_host *h
host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
host->ports[i]->local_port_no = i + 1;
}
drivers/net/ethernet/qualcomm/essedma/edma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/net/ethernet/qualcomm/essedma/edma.c b/drivers/net/ethernet/qualcomm/essedma/edma.c
-index a3c0d66..29bc9f8 100644
--- a/drivers/net/ethernet/qualcomm/essedma/edma.c
+++ b/drivers/net/ethernet/qualcomm/essedma/edma.c
-@@ -193,7 +193,7 @@ static int edma_alloc_rx_buf(struct edma_common_info
+@@ -201,7 +201,7 @@ static int edma_alloc_rx_buf(struct edma
skb = sw_desc->skb;
} else {
/* alloc skb */
if (!skb) {
/* Better luck next round */
break;
---
-2.17.1
-
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
-@@ -1127,6 +1127,9 @@ int __init early_init_dt_scan_chosen(uns
+@@ -1130,6 +1130,9 @@ int __init early_init_dt_scan_chosen(uns
p = of_get_flat_dt_prop(node, "bootargs", &l);
if (p != NULL && l > 0)
strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE));
+ p = of_get_flat_dt_prop(node, "bootargs-append", &l);
+ if (p != NULL && l > 0)
+ strlcat(data, p, min_t(int, strlen(data) + (int)l, COMMAND_LINE_SIZE));
-
+
/*
* CONFIG_CMDLINE is meant to be a default in case nothing else
if (mux->lock)
spin_lock_irqsave(mux->lock, flags);
else
-@@ -102,14 +121,14 @@ static int clk_mux_set_parent(struct clk
+@@ -110,14 +129,14 @@ static int clk_mux_determine_rate(struct
}
const struct clk_ops clk_mux_ops = {
- .get_parent = clk_mux_get_parent,
+ .get_parent = _clk_mux_get_parent,
.set_parent = clk_mux_set_parent,
- .determine_rate = __clk_mux_determine_rate,
+ .determine_rate = clk_mux_determine_rate,
};
EXPORT_SYMBOL_GPL(clk_mux_ops);
};
EXPORT_SYMBOL_GPL(clk_mux_ro_ops);
-@@ -117,7 +136,7 @@ struct clk_hw *clk_hw_register_mux_table
+@@ -125,7 +144,7 @@ struct clk_hw *clk_hw_register_mux_table
const char * const *parent_names, u8 num_parents,
unsigned long flags,
void __iomem *reg, u8 shift, u32 mask,
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -699,6 +699,16 @@ dtb-$(CONFIG_ARCH_QCOM) += \
- qcom-apq8084-mtp.dtb \
- qcom-ipq4019-ap.dk01.1-c1.dtb \
- qcom-ipq8064-ap148.dtb \
+ qcom-apq8084-mtp.dtb \
+ qcom-ipq4019-ap.dk01.1-c1.dtb \
+ qcom-ipq8064-ap148.dtb \
+ qcom-ipq8064-c2600.dtb \
+ qcom-ipq8064-d7800.dtb \
+ qcom-ipq8064-db149.dtb \
+ qcom-ipq8064-wpq864.dtb \
+ qcom-ipq8065-nbg6817.dtb \
+ qcom-ipq8065-r7800.dtb \
- qcom-msm8660-surf.dtb \
- qcom-msm8960-cdp.dtb \
- qcom-msm8974-lge-nexus5-hammerhead.dtb \
+ qcom-msm8660-surf.dtb \
+ qcom-msm8960-cdp.dtb \
+ qcom-msm8974-lge-nexus5-hammerhead.dtb \
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
-@@ -796,7 +796,7 @@ unlock_out:
+@@ -797,7 +797,7 @@ unlock_out:
clk_core_disable_unprepare(core->parent);
}
1 file changed, 94 insertions(+)
create mode 100644 include/dt-bindings/reset/mt7622-reset.h
-diff --git a/include/dt-bindings/reset/mt7622-reset.h b/include/dt-bindings/reset/mt7622-reset.h
-new file mode 100644
-index 000000000000..234052f80417
--- /dev/null
+++ b/include/dt-bindings/reset/mt7622-reset.h
@@ -0,0 +1,94 @@
+#define MT7622_ETHSYS_PPE_RST 31
+
+#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT7622 */
---
-2.11.0
-
drivers/soc/mediatek/mtk-pmic-wrap.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index c2048382830f..f095faac1e04 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
-@@ -827,7 +827,8 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
+@@ -827,7 +827,8 @@ static int pwrap_init_cipher(struct pmic
/* wait for cipher data ready@PMIC */
ret = pwrap_wait_for_state(wrp, pwrap_is_pmic_cipher_ready);
if (ret) {
return ret;
}
-@@ -1159,23 +1160,27 @@ static int pwrap_probe(struct platform_device *pdev)
+@@ -1159,23 +1160,27 @@ static int pwrap_probe(struct platform_d
if (IS_ERR(wrp->bridge_base))
return PTR_ERR(wrp->bridge_base);
return PTR_ERR(wrp->clk_wrap);
}
-@@ -1220,8 +1225,9 @@ static int pwrap_probe(struct platform_device *pdev)
+@@ -1220,8 +1225,9 @@ static int pwrap_probe(struct platform_d
pwrap_writel(wrp, wrp->master->int_en_all, PWRAP_INT_EN);
irq = platform_get_irq(pdev, 0);
if (ret)
goto err_out2;
---
-2.11.0
-
drivers/usb/mtu3/mtu3_plat.c | 8 ++++++--
3 files changed, 22 insertions(+), 5 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index b26fffc58446..112723d6e7bc 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -210,6 +210,8 @@ struct otg_switch_mtk {
struct dentry *dbgfs_root;
/* usb wakeup for host mode */
bool wakeup_en;
-diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
-index e42d308b8dc2..4dd9508a60b5 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
-@@ -151,6 +151,7 @@ int ssusb_host_enable(struct ssusb_mtk *ssusb)
+@@ -151,6 +151,7 @@ int ssusb_host_enable(struct ssusb_mtk *
void __iomem *ibase = ssusb->ippc_base;
int num_u3p = ssusb->u3_ports;
int num_u2p = ssusb->u2_ports;
u32 check_clk;
u32 value;
int i;
-@@ -158,8 +159,14 @@ int ssusb_host_enable(struct ssusb_mtk *ssusb)
+@@ -158,8 +159,14 @@ int ssusb_host_enable(struct ssusb_mtk *
/* power on host ip */
mtu3_clrbits(ibase, U3D_SSUSB_IP_PW_CTRL1, SSUSB_IP_HOST_PDN);
value = mtu3_readl(ibase, SSUSB_U3_CTRL(i));
value &= ~(SSUSB_U3_PORT_PDN | SSUSB_U3_PORT_DIS);
value |= SSUSB_U3_PORT_HOST_SEL;
-@@ -175,7 +182,7 @@ int ssusb_host_enable(struct ssusb_mtk *ssusb)
+@@ -175,7 +182,7 @@ int ssusb_host_enable(struct ssusb_mtk *
}
check_clk = SSUSB_XHCI_RST_B_STS;
check_clk = SSUSB_U3_MAC_RST_B_STS;
return ssusb_check_clocks(ssusb, check_clk);
-@@ -190,8 +197,11 @@ int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend)
+@@ -190,8 +197,11 @@ int ssusb_host_disable(struct ssusb_mtk
int ret;
int i;
value = mtu3_readl(ibase, SSUSB_U3_CTRL(i));
value |= SSUSB_U3_PORT_PDN;
value |= suspend ? 0 : SSUSB_U3_PORT_DIS;
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index 088e3e685c4f..9edad30c8ae5 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
-@@ -276,6 +276,10 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -276,6 +276,10 @@ static int get_ssusb_rscs(struct platfor
if (ret)
return ret;
if (ssusb->dr_mode != USB_DR_MODE_OTG)
return 0;
-@@ -304,8 +308,8 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -304,8 +308,8 @@ static int get_ssusb_rscs(struct platfor
}
}
return 0;
}
---
-2.11.0
-
drivers/usb/mtu3/mtu3_host.c | 57 ++++----------------------------------------
2 files changed, 4 insertions(+), 57 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index 112723d6e7bc..6d3278e46431 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -214,8 +214,6 @@ struct otg_switch_mtk {
struct regmap *pericfg;
};
-diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
-index 4dd9508a60b5..edcc59148171 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
-@@ -79,20 +79,6 @@ int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb,
+@@ -79,20 +79,6 @@ int ssusb_wakeup_of_property_parse(struc
if (!ssusb->wakeup_en)
return 0;
ssusb->pericfg = syscon_regmap_lookup_by_phandle(dn,
"mediatek,syscon-wakeup");
if (IS_ERR(ssusb->pericfg)) {
-@@ -103,36 +89,6 @@ int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb,
+@@ -103,36 +89,6 @@ int ssusb_wakeup_of_property_parse(struc
return 0;
}
static void host_ports_num_get(struct ssusb_mtk *ssusb)
{
u32 xhci_cap;
-@@ -286,19 +242,14 @@ void ssusb_host_exit(struct ssusb_mtk *ssusb)
+@@ -286,19 +242,14 @@ void ssusb_host_exit(struct ssusb_mtk *s
int ssusb_wakeup_enable(struct ssusb_mtk *ssusb)
{
- ssusb_wakeup_clks_disable(ssusb);
- }
}
---
-2.11.0
-
drivers/usb/mtu3/mtu3_plat.c | 121 +++++++++++++++++++++++++++++--------------
2 files changed, 86 insertions(+), 40 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index 6d3278e46431..2795294ec92a 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -206,6 +206,9 @@ struct otg_switch_mtk {
/* otg */
struct otg_switch_mtk otg_switch;
enum usb_dr_mode dr_mode;
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index 9edad30c8ae5..fb8992011bde 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
-@@ -110,15 +110,9 @@ static void ssusb_phy_power_off(struct ssusb_mtk *ssusb)
+@@ -110,15 +110,9 @@ static void ssusb_phy_power_off(struct s
phy_power_off(ssusb->phys[i]);
}
ret = clk_prepare_enable(ssusb->sys_clk);
if (ret) {
-@@ -132,6 +126,52 @@ static int ssusb_rscs_init(struct ssusb_mtk *ssusb)
+@@ -132,6 +126,52 @@ static int ssusb_rscs_init(struct ssusb_
goto ref_clk_err;
}
ret = ssusb_phy_init(ssusb);
if (ret) {
dev_err(ssusb->dev, "failed to init phy\n");
-@@ -149,20 +189,16 @@ static int ssusb_rscs_init(struct ssusb_mtk *ssusb)
+@@ -149,20 +189,16 @@ static int ssusb_rscs_init(struct ssusb_
phy_err:
ssusb_phy_exit(ssusb);
phy_init_err:
regulator_disable(ssusb->vusb33);
ssusb_phy_power_off(ssusb);
ssusb_phy_exit(ssusb);
-@@ -203,6 +239,19 @@ static int get_iddig_pinctrl(struct ssusb_mtk *ssusb)
+@@ -203,6 +239,19 @@ static int get_iddig_pinctrl(struct ssus
return 0;
}
static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
{
struct device_node *node = pdev->dev.of_node;
-@@ -225,18 +274,17 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -225,18 +274,17 @@ static int get_ssusb_rscs(struct platfor
return PTR_ERR(ssusb->sys_clk);
}
- if (IS_ERR(ssusb->ref_clk)) {
- if (PTR_ERR(ssusb->ref_clk) == -EPROBE_DEFER)
- return -EPROBE_DEFER;
+-
+- ssusb->ref_clk = NULL;
+- }
+ ssusb->ref_clk = get_optional_clk(dev, "ref_ck");
+ if (IS_ERR(ssusb->ref_clk))
+ return PTR_ERR(ssusb->ref_clk);
-
-- ssusb->ref_clk = NULL;
-- }
++
+ ssusb->mcu_clk = get_optional_clk(dev, "mcu_ck");
+ if (IS_ERR(ssusb->mcu_clk))
+ return PTR_ERR(ssusb->mcu_clk);
ssusb->num_phys = of_count_phandle_with_args(node,
"phys", "#phy-cells");
-@@ -451,8 +499,7 @@ static int __maybe_unused mtu3_suspend(struct device *dev)
+@@ -451,8 +499,7 @@ static int __maybe_unused mtu3_suspend(s
ssusb_host_disable(ssusb, true);
ssusb_phy_power_off(ssusb);
ssusb_wakeup_enable(ssusb);
return 0;
-@@ -470,27 +517,21 @@ static int __maybe_unused mtu3_resume(struct device *dev)
+@@ -470,27 +517,21 @@ static int __maybe_unused mtu3_resume(st
return 0;
ssusb_wakeup_disable(ssusb);
return ret;
}
---
-2.11.0
-
drivers/usb/mtu3/mtu3_qmu.c | 102 +++++++++++++++++++++++++++++++++-------
4 files changed, 142 insertions(+), 21 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index 2795294ec92a..ef2dc92a2109 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -46,6 +46,9 @@ struct mtu3_request;
__u8 ext_flag;
} __packed;
-diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
-index 947579842ad7..cd4528f5f337 100644
--- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c
@@ -17,6 +17,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_address.h>
-@@ -759,7 +760,31 @@ static void mtu3_hw_exit(struct mtu3 *mtu)
+@@ -759,7 +760,31 @@ static void mtu3_hw_exit(struct mtu3 *mt
mtu3_mem_free(mtu);
}
int ssusb_gadget_init(struct ssusb_mtk *ssusb)
{
-@@ -820,6 +845,12 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb)
+@@ -820,6 +845,12 @@ int ssusb_gadget_init(struct ssusb_mtk *
return ret;
}
ret = devm_request_irq(dev, mtu->irq, mtu3_irq, 0, dev_name(dev), mtu);
if (ret) {
dev_err(dev, "request irq %d failed!\n", mtu->irq);
-@@ -845,6 +876,7 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb)
+@@ -845,6 +876,7 @@ int ssusb_gadget_init(struct ssusb_mtk *
gadget_err:
device_init_wakeup(dev, false);
irq_err:
mtu3_hw_exit(mtu);
ssusb->u3d = NULL;
-diff --git a/drivers/usb/mtu3/mtu3_hw_regs.h b/drivers/usb/mtu3/mtu3_hw_regs.h
-index 06b29664470f..b6059752dc12 100644
--- a/drivers/usb/mtu3/mtu3_hw_regs.h
+++ b/drivers/usb/mtu3/mtu3_hw_regs.h
@@ -58,6 +58,8 @@
#define VBUS_ON BIT(1)
#define VBUS_FRC_EN BIT(0)
-diff --git a/drivers/usb/mtu3/mtu3_qmu.c b/drivers/usb/mtu3/mtu3_qmu.c
-index 7d9ba8a52368..42145a3f1422 100644
--- a/drivers/usb/mtu3/mtu3_qmu.c
+++ b/drivers/usb/mtu3/mtu3_qmu.c
@@ -40,7 +40,58 @@
static struct qmu_gpd *gpd_dma_to_virt(struct mtu3_gpd_ring *ring,
dma_addr_t dma_addr)
-@@ -193,21 +244,27 @@ static int mtu3_prepare_tx_gpd(struct mtu3_ep *mep, struct mtu3_request *mreq)
+@@ -193,21 +244,27 @@ static int mtu3_prepare_tx_gpd(struct mt
struct mtu3_gpd_ring *ring = &mep->gpd_ring;
struct qmu_gpd *gpd = ring->enqueue;
struct usb_request *req = &mreq->request;
if (req->zero)
gpd->ext_flag |= GPD_EXT_FLAG_ZLP;
-@@ -226,21 +283,27 @@ static int mtu3_prepare_rx_gpd(struct mtu3_ep *mep, struct mtu3_request *mreq)
+@@ -226,21 +283,27 @@ static int mtu3_prepare_rx_gpd(struct mt
struct mtu3_gpd_ring *ring = &mep->gpd_ring;
struct qmu_gpd *gpd = ring->enqueue;
struct usb_request *req = &mreq->request;
mtu3_setbits(mbase, U3D_QCR0, QMU_RX_CS_EN(epnum));
/* don't expect ZLP */
mtu3_clrbits(mbase, U3D_QCR3, QMU_RX_ZLP(epnum));
-@@ -353,9 +416,9 @@ static void qmu_tx_zlp_error_handler(struct mtu3 *mtu, u8 epnum)
+@@ -353,9 +416,9 @@ static void qmu_tx_zlp_error_handler(str
struct mtu3_gpd_ring *ring = &mep->gpd_ring;
void __iomem *mbase = mtu->mac_base;
struct qmu_gpd *gpd_current = NULL;
u32 txcsr = 0;
int ret;
-@@ -365,7 +428,8 @@ static void qmu_tx_zlp_error_handler(struct mtu3 *mtu, u8 epnum)
+@@ -365,7 +428,8 @@ static void qmu_tx_zlp_error_handler(str
else
return;
if (le16_to_cpu(gpd_current->buf_len) != 0) {
dev_err(mtu->dev, "TX EP%d buffer length error(!=0)\n", epnum);
-@@ -408,12 +472,13 @@ static void qmu_done_tx(struct mtu3 *mtu, u8 epnum)
+@@ -408,12 +472,13 @@ static void qmu_done_tx(struct mtu3 *mtu
void __iomem *mbase = mtu->mac_base;
struct qmu_gpd *gpd = ring->dequeue;
struct qmu_gpd *gpd_current = NULL;
dev_dbg(mtu->dev, "%s EP%d, last=%p, current=%p, enq=%p\n",
__func__, epnum, gpd, gpd_current, ring->enqueue);
-@@ -446,11 +511,12 @@ static void qmu_done_rx(struct mtu3 *mtu, u8 epnum)
+@@ -446,11 +511,12 @@ static void qmu_done_rx(struct mtu3 *mtu
void __iomem *mbase = mtu->mac_base;
struct qmu_gpd *gpd = ring->dequeue;
struct qmu_gpd *gpd_current = NULL;
dev_dbg(mtu->dev, "%s EP%d, last=%p, current=%p, enq=%p\n",
__func__, epnum, gpd, gpd_current, ring->enqueue);
---
-2.11.0
-
drivers/usb/mtu3/mtu3_plat.c | 38 ++-----------------------
6 files changed, 74 insertions(+), 56 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index ef2dc92a2109..b0c2b5dca045 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -115,6 +115,19 @@ enum mtu3_g_ep0_state {
bool manual_drd_enabled;
};
-diff --git a/drivers/usb/mtu3/mtu3_dr.c b/drivers/usb/mtu3/mtu3_dr.c
-index 560256115b23..ec442cd5a1ad 100644
--- a/drivers/usb/mtu3/mtu3_dr.c
+++ b/drivers/usb/mtu3/mtu3_dr.c
-@@ -261,21 +261,22 @@ static void extcon_register_dwork(struct work_struct *work)
+@@ -261,21 +261,22 @@ static void extcon_register_dwork(struct
* depending on user input.
* This is useful in special cases, such as uses TYPE-A receptacle but also
* wants to support dual-role mode.
static int ssusb_mode_show(struct seq_file *sf, void *unused)
{
struct ssusb_mtk *ssusb = sf->private;
-@@ -388,17 +389,45 @@ static void ssusb_debugfs_exit(struct ssusb_mtk *ssusb)
+@@ -388,17 +389,45 @@ static void ssusb_debugfs_exit(struct ss
debugfs_remove_recursive(ssusb->dbgfs_root);
}
- if (otg_sx->manual_drd_enabled)
+ if (otg_sx->manual_drd_enabled) {
ssusb_debugfs_init(ssusb);
--
-- /* It is enough to delay 1s for waiting for host initialization */
-- schedule_delayed_work(&otg_sx->extcon_reg_dwork, HZ);
+ } else {
+ INIT_DELAYED_WORK(&otg_sx->extcon_reg_dwork,
+ extcon_register_dwork);
-+
+
+- /* It is enough to delay 1s for waiting for host initialization */
+- schedule_delayed_work(&otg_sx->extcon_reg_dwork, HZ);
+ /*
+ * It is enough to delay 1s for waiting for
+ * host initialization
return 0;
}
-@@ -407,8 +436,8 @@ void ssusb_otg_switch_exit(struct ssusb_mtk *ssusb)
+@@ -407,8 +436,8 @@ void ssusb_otg_switch_exit(struct ssusb_
{
struct otg_switch_mtk *otg_sx = &ssusb->otg_switch;
+ else
+ cancel_delayed_work(&otg_sx->extcon_reg_dwork);
}
-diff --git a/drivers/usb/mtu3/mtu3_dr.h b/drivers/usb/mtu3/mtu3_dr.h
-index 9b228b5811b0..0f0cbac00192 100644
--- a/drivers/usb/mtu3/mtu3_dr.h
+++ b/drivers/usb/mtu3/mtu3_dr.h
-@@ -87,6 +87,8 @@ static inline void ssusb_gadget_exit(struct ssusb_mtk *ssusb)
+@@ -87,6 +87,8 @@ static inline void ssusb_gadget_exit(str
int ssusb_otg_switch_init(struct ssusb_mtk *ssusb);
void ssusb_otg_switch_exit(struct ssusb_mtk *ssusb);
int ssusb_set_vbus(struct otg_switch_mtk *otg_sx, int is_on);
#else
-@@ -103,6 +105,10 @@ static inline int ssusb_set_vbus(struct otg_switch_mtk *otg_sx, int is_on)
+@@ -103,6 +105,10 @@ static inline int ssusb_set_vbus(struct
return 0;
}
#endif
#endif /* _MTU3_DR_H_ */
-diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
-index edcc59148171..ec76b86dd887 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
-@@ -189,6 +189,8 @@ int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend)
+@@ -189,6 +189,8 @@ int ssusb_host_disable(struct ssusb_mtk
static void ssusb_host_setup(struct ssusb_mtk *ssusb)
{
host_ports_num_get(ssusb);
/*
-@@ -197,6 +199,9 @@ static void ssusb_host_setup(struct ssusb_mtk *ssusb)
+@@ -197,6 +199,9 @@ static void ssusb_host_setup(struct ssus
*/
ssusb_host_enable(ssusb);
/* if port0 supports dual-role, works as host mode by default */
ssusb_set_vbus(&ssusb->otg_switch, 1);
}
-diff --git a/drivers/usb/mtu3/mtu3_hw_regs.h b/drivers/usb/mtu3/mtu3_hw_regs.h
-index b6059752dc12..a7e35f6ad90a 100644
--- a/drivers/usb/mtu3/mtu3_hw_regs.h
+++ b/drivers/usb/mtu3/mtu3_hw_regs.h
@@ -472,6 +472,8 @@
#define SSUSB_U2_PORT_VBUSVALID BIT(9)
#define SSUSB_U2_PORT_OTG_SEL BIT(7)
#define SSUSB_U2_PORT_HOST BIT(2)
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index fb8992011bde..1e473b068650 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -21,7 +21,6 @@
#include <linux/platform_device.h>
#include "mtu3.h"
-@@ -212,33 +211,6 @@ static void ssusb_ip_sw_reset(struct ssusb_mtk *ssusb)
+@@ -212,33 +211,6 @@ static void ssusb_ip_sw_reset(struct ssu
mtu3_clrbits(ssusb->ippc_base, U3D_SSUSB_IP_PW_CTRL0, SSUSB_IP_SW_RST);
}
/* ignore the error if the clock does not exist */
static struct clk *get_optional_clk(struct device *dev, const char *id)
{
-@@ -349,15 +321,11 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -349,15 +321,11 @@ static int get_ssusb_rscs(struct platfor
dev_err(ssusb->dev, "couldn't get extcon device\n");
return -EPROBE_DEFER;
}
return 0;
}
---
-2.11.0
-
drivers/usb/mtu3/mtu3_hw_regs.h | 1 +
5 files changed, 23 insertions(+), 12 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index b0c2b5dca045..d80e4e813248 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -94,6 +94,7 @@ enum mtu3_speed {
};
/**
-diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
-index cd4528f5f337..67f7a309aba7 100644
--- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c
-@@ -237,7 +237,7 @@ void mtu3_ep_stall_set(struct mtu3_ep *mep, bool set)
+@@ -237,7 +237,7 @@ void mtu3_ep_stall_set(struct mtu3_ep *m
void mtu3_dev_on_off(struct mtu3 *mtu, int is_on)
{
mtu3_ss_func_set(mtu, is_on);
else
mtu3_hs_softconn_set(mtu, is_on);
-@@ -547,6 +547,9 @@ static void mtu3_set_speed(struct mtu3 *mtu)
+@@ -547,6 +547,9 @@ static void mtu3_set_speed(struct mtu3 *
mtu3_clrbits(mbase, U3D_USB3_CONFIG, USB3_EN);
/* HS/FS detected by HW */
mtu3_setbits(mbase, U3D_POWER_MANAGEMENT, HS_ENABLE);
}
dev_info(mtu->dev, "max_speed: %s\n",
-@@ -624,6 +627,10 @@ static irqreturn_t mtu3_link_isr(struct mtu3 *mtu)
+@@ -624,6 +627,10 @@ static irqreturn_t mtu3_link_isr(struct
udev_speed = USB_SPEED_SUPER;
maxpkt = 512;
break;
default:
udev_speed = USB_SPEED_UNKNOWN;
break;
-@@ -825,14 +832,15 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb)
+@@ -825,14 +832,15 @@ int ssusb_gadget_init(struct ssusb_mtk *
case USB_SPEED_FULL:
case USB_SPEED_HIGH:
case USB_SPEED_SUPER:
break;
}
-diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c
-index 434fca58143c..b495471f689f 100644
--- a/drivers/usb/mtu3/mtu3_gadget.c
+++ b/drivers/usb/mtu3/mtu3_gadget.c
-@@ -89,6 +89,7 @@ static int mtu3_ep_enable(struct mtu3_ep *mep)
+@@ -89,6 +89,7 @@ static int mtu3_ep_enable(struct mtu3_ep
switch (mtu->g.speed) {
case USB_SPEED_SUPER:
if (usb_endpoint_xfer_int(desc) ||
usb_endpoint_xfer_isoc(desc)) {
interval = desc->bInterval;
-@@ -456,7 +457,7 @@ static int mtu3_gadget_wakeup(struct usb_gadget *gadget)
+@@ -456,7 +457,7 @@ static int mtu3_gadget_wakeup(struct usb
return -EOPNOTSUPP;
spin_lock_irqsave(&mtu->lock, flags);
mtu3_setbits(mtu->mac_base, U3D_LINK_POWER_CONTROL, UX_EXIT);
} else {
mtu3_setbits(mtu->mac_base, U3D_POWER_MANAGEMENT, RESUME);
-diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c
-index 958d74dd2b78..020b25314a68 100644
--- a/drivers/usb/mtu3/mtu3_gadget_ep0.c
+++ b/drivers/usb/mtu3/mtu3_gadget_ep0.c
-@@ -212,8 +212,8 @@ ep0_get_status(struct mtu3 *mtu, const struct usb_ctrlrequest *setup)
+@@ -212,8 +212,8 @@ ep0_get_status(struct mtu3 *mtu, const s
case USB_RECIP_DEVICE:
result[0] = mtu->is_self_powered << USB_DEVICE_SELF_POWERED;
result[0] |= mtu->may_wakeup << USB_DEVICE_REMOTE_WAKEUP;
result[0] |= mtu->u1_enable << USB_DEV_STAT_U1_ENABLED;
result[0] |= mtu->u2_enable << USB_DEV_STAT_U2_ENABLED;
}
-@@ -329,8 +329,8 @@ static int ep0_handle_feature_dev(struct mtu3 *mtu,
+@@ -329,8 +329,8 @@ static int ep0_handle_feature_dev(struct
handled = handle_test_mode(mtu, setup);
break;
case USB_DEVICE_U1_ENABLE:
break;
lpc = mtu3_readl(mbase, U3D_LINK_POWER_CONTROL);
-@@ -344,8 +344,8 @@ static int ep0_handle_feature_dev(struct mtu3 *mtu,
+@@ -344,8 +344,8 @@ static int ep0_handle_feature_dev(struct
handled = 1;
break;
case USB_DEVICE_U2_ENABLE:
break;
lpc = mtu3_readl(mbase, U3D_LINK_POWER_CONTROL);
-@@ -384,8 +384,8 @@ static int ep0_handle_feature(struct mtu3 *mtu,
+@@ -384,8 +384,8 @@ static int ep0_handle_feature(struct mtu
break;
case USB_RECIP_INTERFACE:
/* superspeed only */
/*
* forward the request because function drivers
* should handle it
-diff --git a/drivers/usb/mtu3/mtu3_hw_regs.h b/drivers/usb/mtu3/mtu3_hw_regs.h
-index a7e35f6ad90a..6953436a1688 100644
--- a/drivers/usb/mtu3/mtu3_hw_regs.h
+++ b/drivers/usb/mtu3/mtu3_hw_regs.h
@@ -467,6 +467,7 @@
#define SSUSB_U3_PORT_HOST_SEL BIT(2)
#define SSUSB_U3_PORT_PDN BIT(1)
#define SSUSB_U3_PORT_DIS BIT(0)
---
-2.11.0
-
drivers/usb/mtu3/mtu3_plat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index 1e473b068650..7ca81f4e78a3 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
-@@ -300,10 +300,6 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -300,10 +300,6 @@ static int get_ssusb_rscs(struct platfor
of_property_read_u32(node, "mediatek,u3p-dis-msk",
&ssusb->u3p_dis_msk);
vbus = devm_regulator_get(&pdev->dev, "vbus");
if (IS_ERR(vbus)) {
dev_err(dev, "failed to get vbus\n");
-@@ -311,6 +307,10 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -311,6 +307,10 @@ static int get_ssusb_rscs(struct platfor
}
otg_sx->vbus = vbus;
otg_sx->is_u3_drd = of_property_read_bool(node, "mediatek,usb3-drd");
otg_sx->manual_drd_enabled =
of_property_read_bool(node, "enable-manual-drd");
---
-2.11.0
-
drivers/usb/mtu3/mtu3_plat.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index 7ca81f4e78a3..9ff33579b42e 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
-@@ -283,10 +283,8 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -283,10 +283,8 @@ static int get_ssusb_rscs(struct platfor
return PTR_ERR(ssusb->ippc_base);
ssusb->dr_mode = usb_get_dr_mode(dev);
if (ssusb->dr_mode == USB_DR_MODE_PERIPHERAL)
return 0;
---
-2.11.0
-
drivers/usb/mtu3/mtu3_core.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
-index 67f7a309aba7..7c149a7da14e 100644
--- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c
-@@ -115,7 +115,9 @@ static int mtu3_device_enable(struct mtu3 *mtu)
+@@ -115,7 +115,9 @@ static int mtu3_device_enable(struct mtu
mtu3_clrbits(ibase, SSUSB_U2_CTRL(0),
(SSUSB_U2_PORT_DIS | SSUSB_U2_PORT_PDN |
SSUSB_U2_PORT_HOST_SEL));
return ssusb_check_clocks(mtu->ssusb, check_clk);
}
-@@ -130,7 +132,10 @@ static void mtu3_device_disable(struct mtu3 *mtu)
+@@ -130,7 +132,10 @@ static void mtu3_device_disable(struct m
mtu3_setbits(ibase, SSUSB_U2_CTRL(0),
SSUSB_U2_PORT_DIS | SSUSB_U2_PORT_PDN);
mtu3_setbits(ibase, U3D_SSUSB_IP_PW_CTRL2, SSUSB_IP_DEV_PDN);
}
---
-2.11.0
-
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 2 ++
1 file changed, 2 insertions(+)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
-index 49f54767cd21..7c611d14a0a0 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
@@ -44,6 +44,8 @@ Optional properties:
Sub-nodes:
The xhci should be added as subnode to mtu3 as shown in the following example
---
-2.11.0
-
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
-index 7c611d14a0a0..49c982bb5bfc 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
@@ -14,9 +14,9 @@ Required properties:
vusb33-supply = <&mt6397_vusb_reg>;
vbus-supply = <&usb_p0_vbus>;
extcon = <&extcon_usb>;
---
-2.11.0
-
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
-index 49c982bb5bfc..b2271d8e6b50 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
@@ -30,9 +30,10 @@ Optional properties:
- pinctrl-0 : pin control group
See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
---
-2.11.0
-
Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
-diff --git a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
-index 107700d00df4..bf80e3f96f8c 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
+++ b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
@@ -19,6 +19,7 @@ IP Pairing
"mediatek,mt8135-pwrap" for MT8135 SoCs
"mediatek,mt8173-pwrap" for MT8173 SoCs
- interrupts: IRQ for pwrap in SOC
-@@ -36,9 +37,12 @@ Required properties in pwrap device node.
+@@ -36,9 +37,12 @@ Required properties in pwrap device node
- clocks: Must contain an entry for each entry in clock-names.
Optional properities:
Example:
pwrap: pwrap@1000f000 {
---
-2.11.0
-
drivers/soc/mediatek/mtk-pmic-wrap.c | 55 +++++++++++++++++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index f095faac1e04..06930e2ebe4c 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -487,6 +487,7 @@ static int mt8135_regs[] = {
};
struct pmic_wrapper {
-@@ -609,7 +617,7 @@ static int pwrap_write(struct pmic_wrapper *wrp, u32 adr, u32 wdata)
+@@ -609,7 +617,7 @@ static int pwrap_write(struct pmic_wrapp
return 0;
}
{
int ret;
-@@ -632,6 +640,39 @@ static int pwrap_read(struct pmic_wrapper *wrp, u32 adr, u32 *rdata)
+@@ -632,6 +640,39 @@ static int pwrap_read(struct pmic_wrappe
return 0;
}
static int pwrap_regmap_read(void *context, u32 adr, u32 *rdata)
{
return pwrap_read(context, adr, rdata);
-@@ -752,6 +793,8 @@ static int pwrap_mt2701_init_reg_clock(struct pmic_wrapper *wrp)
+@@ -752,6 +793,8 @@ static int pwrap_mt2701_init_reg_clock(s
pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_START);
pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_END);
break;
}
return 0;
-@@ -815,6 +858,8 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
+@@ -815,6 +858,8 @@ static int pwrap_init_cipher(struct pmic
pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_EN],
0x1);
break;
}
/* wait for cipher data ready@AP */
-@@ -1036,11 +1081,19 @@ static const struct regmap_config pwrap_regmap_config = {
+@@ -1036,11 +1081,19 @@ static const struct regmap_config pwrap_
static const struct pwrap_slv_type pmic_mt6323 = {
.dew_regs = mt6323_regs,
.type = PMIC_MT6323,
};
static const struct of_device_id of_slave_match_tbl[] = {
---
-2.11.0
-
drivers/soc/mediatek/mtk-pmic-wrap.c | 70 +++++++++++++++++++++++++++---------
1 file changed, 54 insertions(+), 16 deletions(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index 06930e2ebe4c..2d3a8faae124 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -507,6 +507,7 @@ struct pwrap_slv_type {
};
struct pmic_wrapper {
-@@ -601,22 +602,6 @@ static int pwrap_wait_for_state(struct pmic_wrapper *wrp,
+@@ -601,22 +602,6 @@ static int pwrap_wait_for_state(struct p
} while (1);
}
static int pwrap_read16(struct pmic_wrapper *wrp, u32 adr, u32 *rdata)
{
int ret;
-@@ -673,6 +658,56 @@ static int pwrap_read(struct pmic_wrapper *wrp, u32 adr, u32 *rdata)
+@@ -673,6 +658,56 @@ static int pwrap_read(struct pmic_wrappe
return wrp->slave->pwrap_read(wrp, adr, rdata);
}
static int pwrap_regmap_read(void *context, u32 adr, u32 *rdata)
{
return pwrap_read(context, adr, rdata);
-@@ -1082,18 +1117,21 @@ static const struct pwrap_slv_type pmic_mt6323 = {
+@@ -1082,18 +1117,21 @@ static const struct pwrap_slv_type pmic_
.dew_regs = mt6323_regs,
.type = PMIC_MT6323,
.pwrap_read = pwrap_read16,
};
static const struct of_device_id of_slave_match_tbl[] = {
---
-2.11.0
-
drivers/soc/mediatek/mtk-pmic-wrap.c | 130 ++++++++++++++++++++++++-----------
1 file changed, 90 insertions(+), 40 deletions(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index 2d3a8faae124..e3398e37a7a6 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -70,6 +70,12 @@
/*
* pwrap operations are highly associated with the PMIC types,
* so the pointers added increases flexibility allowing determination
-@@ -787,6 +795,37 @@ static int pwrap_init_sidly(struct pmic_wrapper *wrp)
+@@ -787,6 +795,37 @@ static int pwrap_init_sidly(struct pmic_
return 0;
}
static int pwrap_mt8135_init_reg_clock(struct pmic_wrapper *wrp)
{
pwrap_writel(wrp, 0x4, PWRAP_CSHEXT);
-@@ -935,6 +974,30 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
+@@ -935,6 +974,30 @@ static int pwrap_init_cipher(struct pmic
return 0;
}
static int pwrap_mt8135_init_soc_specific(struct pmic_wrapper *wrp)
{
/* enable pwrap events and pwrap bridge in AP side */
-@@ -995,7 +1058,6 @@ static int pwrap_mt2701_init_soc_specific(struct pmic_wrapper *wrp)
+@@ -995,7 +1058,6 @@ static int pwrap_mt2701_init_soc_specifi
static int pwrap_init(struct pmic_wrapper *wrp)
{
int ret;
reset_control_reset(wrp->rstc);
if (wrp->rstc_bridge)
-@@ -1007,10 +1069,12 @@ static int pwrap_init(struct pmic_wrapper *wrp)
+@@ -1007,10 +1069,12 @@ static int pwrap_init(struct pmic_wrappe
pwrap_writel(wrp, 0, PWRAP_DCM_DBC_PRD);
}
pwrap_writel(wrp, 1, PWRAP_WRAP_EN);
-@@ -1022,45 +1086,26 @@ static int pwrap_init(struct pmic_wrapper *wrp)
+@@ -1022,45 +1086,26 @@ static int pwrap_init(struct pmic_wrappe
if (ret)
return ret;
if (wrp->master->type == PWRAP_MT8135)
pwrap_writel(wrp, 0x7, PWRAP_RRARB_EN);
-@@ -1116,6 +1161,8 @@ static const struct regmap_config pwrap_regmap_config = {
+@@ -1116,6 +1161,8 @@ static const struct regmap_config pwrap_
static const struct pwrap_slv_type pmic_mt6323 = {
.dew_regs = mt6323_regs,
.type = PMIC_MT6323,
.pwrap_read = pwrap_read16,
.pwrap_write = pwrap_write16,
};
-@@ -1123,6 +1170,7 @@ static const struct pwrap_slv_type pmic_mt6323 = {
+@@ -1123,6 +1170,7 @@ static const struct pwrap_slv_type pmic_
static const struct pwrap_slv_type pmic_mt6380 = {
.dew_regs = NULL,
.type = PMIC_MT6380,
.pwrap_read = pwrap_read32,
.pwrap_write = pwrap_write32,
};
-@@ -1130,6 +1178,8 @@ static const struct pwrap_slv_type pmic_mt6380 = {
+@@ -1130,6 +1178,8 @@ static const struct pwrap_slv_type pmic_
static const struct pwrap_slv_type pmic_mt6397 = {
.dew_regs = mt6397_regs,
.type = PMIC_MT6397,
.pwrap_read = pwrap_read16,
.pwrap_write = pwrap_write16,
};
---
-2.11.0
-
drivers/soc/mediatek/mtk-pmic-wrap.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index e3398e37a7a6..45c3e44d8f40 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -507,6 +507,7 @@ struct pmic_wrapper;
/* Flags indicating the capability for the target slave */
u32 caps;
/*
-@@ -1149,7 +1150,7 @@ static irqreturn_t pwrap_interrupt(int irqno, void *dev_id)
+@@ -1149,7 +1150,7 @@ static irqreturn_t pwrap_interrupt(int i
return IRQ_HANDLED;
}
.reg_bits = 16,
.val_bits = 16,
.reg_stride = 2,
-@@ -1158,9 +1159,19 @@ static const struct regmap_config pwrap_regmap_config = {
+@@ -1158,9 +1159,19 @@ static const struct regmap_config pwrap_
.max_register = 0xffff,
};
.caps = PWRAP_SLV_CAP_SPI | PWRAP_SLV_CAP_DUALIO |
PWRAP_SLV_CAP_SECURITY,
.pwrap_read = pwrap_read16,
-@@ -1170,6 +1181,7 @@ static const struct pwrap_slv_type pmic_mt6323 = {
+@@ -1170,6 +1181,7 @@ static const struct pwrap_slv_type pmic_
static const struct pwrap_slv_type pmic_mt6380 = {
.dew_regs = NULL,
.type = PMIC_MT6380,
.caps = 0,
.pwrap_read = pwrap_read32,
.pwrap_write = pwrap_write32,
-@@ -1178,6 +1190,7 @@ static const struct pwrap_slv_type pmic_mt6380 = {
+@@ -1178,6 +1190,7 @@ static const struct pwrap_slv_type pmic_
static const struct pwrap_slv_type pmic_mt6397 = {
.dew_regs = mt6397_regs,
.type = PMIC_MT6397,
.caps = PWRAP_SLV_CAP_SPI | PWRAP_SLV_CAP_DUALIO |
PWRAP_SLV_CAP_SECURITY,
.pwrap_read = pwrap_read16,
-@@ -1189,9 +1202,14 @@ static const struct of_device_id of_slave_match_tbl[] = {
+@@ -1189,9 +1202,14 @@ static const struct of_device_id of_slav
.compatible = "mediatek,mt6323",
.data = &pmic_mt6323,
}, {
/* sentinel */
}
};
-@@ -1372,7 +1390,7 @@ static int pwrap_probe(struct platform_device *pdev)
+@@ -1372,7 +1390,7 @@ static int pwrap_probe(struct platform_d
if (ret)
goto err_out2;
if (IS_ERR(wrp->regmap)) {
ret = PTR_ERR(wrp->regmap);
goto err_out2;
---
-2.11.0
-
drivers/soc/mediatek/mtk-pmic-wrap.c | 59 ++++++++++++++++++++++--------------
1 file changed, 37 insertions(+), 22 deletions(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index 45c3e44d8f40..cbc3f0e82337 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
-@@ -827,23 +827,44 @@ static int pwrap_init_dual_io(struct pmic_wrapper *wrp)
+@@ -827,23 +827,44 @@ static int pwrap_init_dual_io(struct pmi
return 0;
}
-static int pwrap_mt8135_init_reg_clock(struct pmic_wrapper *wrp)
+-{
+- pwrap_writel(wrp, 0x4, PWRAP_CSHEXT);
+- pwrap_writel(wrp, 0x0, PWRAP_CSHEXT_WRITE);
+- pwrap_writel(wrp, 0x4, PWRAP_CSHEXT_READ);
+- pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_START);
+- pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_END);
+-
+- return 0;
+/*
+ * pwrap_init_chip_select_ext is used to configure CS extension time for each
+ * phase during data transactions on the pwrap bus.
+static void pwrap_init_chip_select_ext(struct pmic_wrapper *wrp, u8 hext_write,
+ u8 hext_read, u8 lext_start,
+ u8 lext_end)
- {
-- pwrap_writel(wrp, 0x4, PWRAP_CSHEXT);
-- pwrap_writel(wrp, 0x0, PWRAP_CSHEXT_WRITE);
-- pwrap_writel(wrp, 0x4, PWRAP_CSHEXT_READ);
-- pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_START);
-- pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_END);
++{
+ /*
+ * After finishing a write and read transaction, extends CS high time
+ * to be at least xT of BUS CLK as hext_write and hext_read specifies
+ */
+ pwrap_writel(wrp, hext_write, PWRAP_CSHEXT_WRITE);
+ pwrap_writel(wrp, hext_read, PWRAP_CSHEXT_READ);
-
-- return 0;
++
+ /*
+ * Extends CS low time after CSL and before CSH command to be at
+ * least xT of BUS CLK as lext_start and lext_end specifies
return 0;
}
-@@ -853,20 +874,14 @@ static int pwrap_mt2701_init_reg_clock(struct pmic_wrapper *wrp)
+@@ -853,20 +874,14 @@ static int pwrap_mt2701_init_reg_clock(s
switch (wrp->slave->type) {
case PMIC_MT6397:
pwrap_writel(wrp, 0xc, PWRAP_RDDMY);
break;
default:
break;
-@@ -1235,7 +1250,7 @@ static const struct pmic_wrapper_type pwrap_mt8135 = {
+@@ -1235,7 +1250,7 @@ static const struct pmic_wrapper_type pw
.spi_w = PWRAP_MAN_CMD_SPI_WRITE,
.wdt_src = PWRAP_WDT_SRC_MASK_ALL,
.has_bridge = 1,
.init_soc_specific = pwrap_mt8135_init_soc_specific,
};
-@@ -1247,7 +1262,7 @@ static const struct pmic_wrapper_type pwrap_mt8173 = {
+@@ -1247,7 +1262,7 @@ static const struct pmic_wrapper_type pw
.spi_w = PWRAP_MAN_CMD_SPI_WRITE,
.wdt_src = PWRAP_WDT_SRC_MASK_NO_STAUPD,
.has_bridge = 0,
.init_soc_specific = pwrap_mt8173_init_soc_specific,
};
---
-2.11.0
-
drivers/soc/mediatek/mtk-pmic-wrap.c | 170 +++++++++++++++++++++++++++++++++++
1 file changed, 170 insertions(+)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index cbc3f0e82337..5d61d127e1d7 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -214,6 +214,36 @@ enum pwrap_regs {
PWRAP_MT8135,
PWRAP_MT8173,
};
-@@ -927,6 +1070,9 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
+@@ -927,6 +1070,9 @@ static int pwrap_init_cipher(struct pmic
case PWRAP_MT8173:
pwrap_writel(wrp, 1, PWRAP_CIPHER_EN);
break;
}
/* Config cipher mode @PMIC */
-@@ -1071,6 +1217,15 @@ static int pwrap_mt2701_init_soc_specific(struct pmic_wrapper *wrp)
+@@ -1071,6 +1217,15 @@ static int pwrap_mt2701_init_soc_specifi
return 0;
}
static int pwrap_init(struct pmic_wrapper *wrp)
{
int ret;
-@@ -1242,6 +1397,18 @@ static const struct pmic_wrapper_type pwrap_mt2701 = {
+@@ -1242,6 +1397,18 @@ static const struct pmic_wrapper_type pw
.init_soc_specific = pwrap_mt2701_init_soc_specific,
};
static const struct pmic_wrapper_type pwrap_mt8135 = {
.regs = mt8135_regs,
.type = PWRAP_MT8135,
-@@ -1271,6 +1438,9 @@ static const struct of_device_id of_pwrap_match_tbl[] = {
+@@ -1271,6 +1438,9 @@ static const struct of_device_id of_pwra
.compatible = "mediatek,mt2701-pwrap",
.data = &pwrap_mt2701,
}, {
.compatible = "mediatek,mt8135-pwrap",
.data = &pwrap_mt8135,
}, {
---
-2.11.0
-
drivers/soc/mediatek/Kconfig | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
-diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
-index 609bb3424c14..a7d0667338f2 100644
--- a/drivers/soc/mediatek/Kconfig
+++ b/drivers/soc/mediatek/Kconfig
@@ -1,9 +1,11 @@
driver.
+
+endmenu
---
-2.11.0
-
arch/arm64/Kconfig.platforms | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
-diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
-index 6b54ee8c1262..ab69f5fce261 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -91,12 +91,13 @@ config ARCH_HISI
config ARCH_MESON
bool "Amlogic Platforms"
---
-2.11.0
-
drivers/phy/mediatek/phy-mtk-tphy.c | 39 +++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
-diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
-index 721a2a1c97ef..402385f2562a 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -96,9 +96,11 @@
#define U3P_U3_CHIP_GPIO_CTLD 0x0c
#define P3C_REG_IP_SW_RST BIT(31)
-@@ -585,6 +587,31 @@ static void u2_phy_instance_exit(struct mtk_tphy *tphy,
+@@ -585,6 +587,31 @@ static void u2_phy_instance_exit(struct
}
}
static struct phy *mtk_phy_xlate(struct device *dev,
struct of_phandle_args *args)
{
-@@ -931,6 +969,7 @@ static const struct phy_ops mtk_tphy_ops = {
+@@ -931,6 +969,7 @@ static const struct phy_ops mtk_tphy_ops
.exit = mtk_phy_exit,
.power_on = mtk_phy_power_on,
.power_off = mtk_phy_power_off,
.owner = THIS_MODULE,
};
---
-2.11.0
-
drivers/usb/host/xhci-mtk.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index 8fb60657ed4f..c197a6d9e157 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
-@@ -606,15 +606,10 @@ static int xhci_mtk_probe(struct platform_device *pdev)
+@@ -606,15 +606,10 @@ static int xhci_mtk_probe(struct platfor
}
/* Initialize dma_mask and coherent_dma_mask to 32-bits */
hcd = usb_create_hcd(driver, dev, dev_name(dev));
if (!hcd) {
ret = -ENOMEM;
---
-2.11.0
-
drivers/usb/host/xhci-mtk.c | 3 ---
2 files changed, 2 insertions(+), 4 deletions(-)
-diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c
-index 6e7ddf6cafae..bfc51bc902b8 100644
--- a/drivers/usb/host/xhci-mtk-sch.c
+++ b/drivers/usb/host/xhci-mtk-sch.c
-@@ -287,12 +287,13 @@ static bool need_bw_sch(struct usb_host_endpoint *ep,
+@@ -287,12 +287,13 @@ static bool need_bw_sch(struct usb_host_
int xhci_mtk_sch_init(struct xhci_hcd_mtk *mtk)
{
sch_array = kcalloc(num_usb_bus, sizeof(*sch_array), GFP_KERNEL);
if (sch_array == NULL)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index c197a6d9e157..9502ca408f01 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
-@@ -492,7 +492,6 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci)
+@@ -492,7 +492,6 @@ static void xhci_mtk_quirks(struct devic
/* called during probe() after chip reset completes */
static int xhci_mtk_setup(struct usb_hcd *hcd)
{
struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd);
int ret;
-@@ -507,8 +506,6 @@ static int xhci_mtk_setup(struct usb_hcd *hcd)
+@@ -507,8 +506,6 @@ static int xhci_mtk_setup(struct usb_hcd
return ret;
if (usb_hcd_is_primary_hcd(hcd)) {
ret = xhci_mtk_sch_init(mtk);
if (ret)
return ret;
---
-2.11.0
-
drivers/usb/host/xhci-mtk.c | 4 ++++
1 file changed, 4 insertions(+)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index 9502ca408f01..7a92bb782e5c 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -43,6 +43,7 @@
#define STS1_XHCI_RST BIT(11)
#define STS1_SYS125_RST BIT(10)
#define STS1_REF_RST BIT(8)
-@@ -125,6 +126,9 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
+@@ -125,6 +126,9 @@ static int xhci_mtk_host_enable(struct x
check_val = STS1_SYSPLL_STABLE | STS1_REF_RST |
STS1_SYS125_RST | STS1_XHCI_RST;
ret = readl_poll_timeout(&ippc->ip_pw_sts1, value,
(check_val == (value & check_val)), 100, 20000);
if (ret) {
---
-2.11.0
-
drivers/usb/host/xhci-mtk.h | 1 +
2 files changed, 16 insertions(+), 3 deletions(-)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index 7a92bb782e5c..97ba51e4e149 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
-@@ -92,6 +92,7 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
+@@ -92,6 +92,7 @@ static int xhci_mtk_host_enable(struct x
{
struct mu3c_ippc_regs __iomem *ippc = mtk->ippc_regs;
u32 value, check_val;
int ret;
int i;
-@@ -103,8 +104,13 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
+@@ -103,8 +104,13 @@ static int xhci_mtk_host_enable(struct x
value &= ~CTRL1_IP_HOST_PDN;
writel(value, &ippc->ip_pw_ctr1);
value = readl(&ippc->u3_ctrl_p[i]);
value &= ~(CTRL_U3_PORT_PDN | CTRL_U3_PORT_DIS);
value |= CTRL_U3_PORT_HOST_SEL;
-@@ -126,7 +132,7 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
+@@ -126,7 +132,7 @@ static int xhci_mtk_host_enable(struct x
check_val = STS1_SYSPLL_STABLE | STS1_REF_RST |
STS1_SYS125_RST | STS1_XHCI_RST;
check_val |= STS1_U3_MAC_RST;
ret = readl_poll_timeout(&ippc->ip_pw_sts1, value,
-@@ -149,8 +155,11 @@ static int xhci_mtk_host_disable(struct xhci_hcd_mtk *mtk)
+@@ -149,8 +155,11 @@ static int xhci_mtk_host_disable(struct
if (!mtk->has_ippc)
return 0;
value = readl(&ippc->u3_ctrl_p[i]);
value |= CTRL_U3_PORT_PDN;
writel(value, &ippc->u3_ctrl_p[i]);
-@@ -573,6 +582,9 @@ static int xhci_mtk_probe(struct platform_device *pdev)
+@@ -573,6 +582,9 @@ static int xhci_mtk_probe(struct platfor
}
mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable");
ret = usb_wakeup_of_property_parse(mtk, node);
if (ret)
-diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
-index 3aa5e1d25064..db55a12f1585 100644
--- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h
@@ -121,6 +121,7 @@ struct xhci_hcd_mtk {
struct regulator *vusb33;
struct regulator *vbus;
struct clk *sys_clk; /* sys and mac clock */
---
-2.11.0
-
drivers/usb/host/xhci-mtk.h | 2 --
2 files changed, 35 deletions(-)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index 97ba51e4e149..d60463c07c54 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
-@@ -237,25 +237,8 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
+@@ -237,25 +237,8 @@ static int xhci_mtk_clks_enable(struct x
goto sys_clk_err;
}
sys_clk_err:
clk_disable_unprepare(mtk->ref_clk);
ref_clk_err:
-@@ -264,10 +247,6 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
+@@ -264,10 +247,6 @@ ref_clk_err:
static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk)
{
clk_disable_unprepare(mtk->sys_clk);
clk_disable_unprepare(mtk->ref_clk);
}
-@@ -371,18 +350,6 @@ static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
+@@ -371,18 +350,6 @@ static int usb_wakeup_of_property_parse(
if (!mtk->wakeup_src)
return 0;
mtk->pericfg = syscon_regmap_lookup_by_phandle(dn,
"mediatek,syscon-wakeup");
if (IS_ERR(mtk->pericfg)) {
-diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
-index db55a12f1585..67783a7af509 100644
--- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h
@@ -126,8 +126,6 @@ struct xhci_hcd_mtk {
struct regmap *pericfg;
struct phy **phys;
int num_phys;
---
-2.11.0
-
drivers/usb/host/xhci-mtk.h | 2 ++
2 files changed, 62 insertions(+), 19 deletions(-)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index d60463c07c54..e5caabe7eebe 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
-@@ -221,6 +221,44 @@ static int xhci_mtk_ssusb_config(struct xhci_hcd_mtk *mtk)
+@@ -221,6 +221,44 @@ static int xhci_mtk_ssusb_config(struct
return xhci_mtk_host_enable(mtk);
}
static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
{
int ret;
-@@ -237,16 +275,34 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
+@@ -237,16 +275,34 @@ static int xhci_mtk_clks_enable(struct x
goto sys_clk_err;
}
clk_disable_unprepare(mtk->sys_clk);
clk_disable_unprepare(mtk->ref_clk);
}
-@@ -529,24 +585,9 @@ static int xhci_mtk_probe(struct platform_device *pdev)
+@@ -529,24 +585,9 @@ static int xhci_mtk_probe(struct platfor
return PTR_ERR(mtk->vusb33);
}
mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable");
/* optional property, ignore the error if it does not exist */
-diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
-index 67783a7af509..45ff5c67efb5 100644
--- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h
@@ -126,6 +126,8 @@ struct xhci_hcd_mtk {
struct regmap *pericfg;
struct phy **phys;
int num_phys;
---
-2.11.0
-
drivers/usb/host/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
-index fa5692dec832..bc09a2e4faeb 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -45,12 +45,12 @@ config USB_XHCI_PLATFORM
If unsure, say N.
config USB_XHCI_MVEBU
---
-2.11.0
-
Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 2 ++
1 file changed, 2 insertions(+)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
-index 5611a2e4ddf0..2d9b459bd890 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -38,6 +38,8 @@ Optional properties:
- vbus-supply : reference to the VBUS regulator;
- usb3-lpm-capable : supports USB3.0 LPM
- pinctrl-names : a pinctrl state named "default" must be defined
---
-2.11.0
-
.../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
-index 2d9b459bd890..30595964876a 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -26,10 +26,11 @@ Required properties:
Optional properties:
- vbus-supply : reference to the VBUS regulator;
---
-2.11.0
-
Documentation/devicetree/bindings/mtd/mtk-quadspi.txt | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
-diff --git a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt b/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
-index 840f9405dcf0..56d3668e2c50 100644
--- a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
+++ b/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
@@ -1,13 +1,16 @@
- reg: physical base address and length of the controller's register
- clocks: the phandle of the clocks needed by the nor controller
- clock-names: the names of the clocks
---
-2.11.0
-
drivers/mtd/spi-nor/mtk-quadspi.c | 70 ++++++++++++++++++++++++++++++++-------
1 file changed, 58 insertions(+), 12 deletions(-)
-diff --git a/drivers/mtd/spi-nor/mtk-quadspi.c b/drivers/mtd/spi-nor/mtk-quadspi.c
-index c258c7adf1c5..abe455ccd68b 100644
--- a/drivers/mtd/spi-nor/mtk-quadspi.c
+++ b/drivers/mtd/spi-nor/mtk-quadspi.c
-@@ -404,6 +404,29 @@ static int mt8173_nor_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf,
+@@ -404,6 +404,29 @@ static int mt8173_nor_write_reg(struct s
return ret;
}
static int mtk_nor_init(struct mt8173_nor *mt8173_nor,
struct device_node *flash_node)
{
-@@ -468,15 +491,11 @@ static int mtk_nor_drv_probe(struct platform_device *pdev)
+@@ -468,15 +491,11 @@ static int mtk_nor_drv_probe(struct plat
return PTR_ERR(mt8173_nor->nor_clk);
mt8173_nor->dev = &pdev->dev;
/* only support one attached flash */
flash_np = of_get_next_available_child(pdev->dev.of_node, NULL);
if (!flash_np) {
-@@ -487,10 +506,9 @@ static int mtk_nor_drv_probe(struct platform_device *pdev)
+@@ -487,10 +506,9 @@ static int mtk_nor_drv_probe(struct plat
ret = mtk_nor_init(mt8173_nor, flash_np);
nor_free:
return ret;
}
-@@ -498,11 +516,38 @@ static int mtk_nor_drv_remove(struct platform_device *pdev)
+@@ -498,11 +516,38 @@ static int mtk_nor_drv_remove(struct pla
{
struct mt8173_nor *mt8173_nor = platform_get_drvdata(pdev);
static const struct of_device_id mtk_nor_of_ids[] = {
{ .compatible = "mediatek,mt8173-nor"},
{ /* sentinel */ }
-@@ -514,6 +559,7 @@ static struct platform_driver mtk_nor_driver = {
+@@ -514,6 +559,7 @@ static struct platform_driver mtk_nor_dr
.remove = mtk_nor_drv_remove,
.driver = {
.name = "mtk-nor",
.of_match_table = mtk_nor_of_ids,
},
};
---
-2.11.0
-
1 file changed, 21 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mt7622.txt
-diff --git a/Documentation/devicetree/bindings/rtc/rtc-mt7622.txt b/Documentation/devicetree/bindings/rtc/rtc-mt7622.txt
-new file mode 100644
-index 000000000000..09fe8f51476f
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-mt7622.txt
@@ -0,0 +1,21 @@
+ clocks = <&topckgen CLK_TOP_RTC>;
+ clock-names = "rtc";
+};
---
-2.11.0
-
3 files changed, 433 insertions(+)
create mode 100644 drivers/rtc/rtc-mt7622.c
-diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
-index e0e58f3b1420..322752ebc5a7 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1715,6 +1715,16 @@ config RTC_DRV_MT6397
config RTC_DRV_XGENE
tristate "APM X-Gene RTC"
depends on HAS_IOMEM
-diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
-index 7230014c92af..5ec891a81f4f 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
-@@ -102,6 +102,7 @@ obj-$(CONFIG_RTC_DRV_MPC5121) += rtc-mpc5121.o
+@@ -103,6 +103,7 @@ obj-$(CONFIG_RTC_DRV_MPC5121) += rtc-mpc
obj-$(CONFIG_RTC_DRV_VRTC) += rtc-mrst.o
obj-$(CONFIG_RTC_DRV_MSM6242) += rtc-msm6242.o
obj-$(CONFIG_RTC_DRV_MT6397) += rtc-mt6397.o
obj-$(CONFIG_RTC_DRV_MV) += rtc-mv.o
obj-$(CONFIG_RTC_DRV_MXC) += rtc-mxc.o
obj-$(CONFIG_RTC_DRV_NUC900) += rtc-nuc900.o
-diff --git a/drivers/rtc/rtc-mt7622.c b/drivers/rtc/rtc-mt7622.c
-new file mode 100644
-index 000000000000..d79b9ae4d237
--- /dev/null
+++ b/drivers/rtc/rtc-mt7622.c
@@ -0,0 +1,422 @@
+MODULE_DESCRIPTION("MediaTek SoC based RTC Driver");
+MODULE_AUTHOR("Sean Wang <sean.wang@mediatek.com>");
+MODULE_LICENSE("GPL");
---
-2.11.0
-
drivers/rtc/Kconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
-index 322752ebc5a7..616fe53c788e 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1706,14 +1706,14 @@ config RTC_DRV_MOXART
config RTC_DRV_MT7622
tristate "MediaTek SoC based RTC"
---
-2.11.0
-
drivers/mtd/nand/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
-index ade5fc4c3819..57f4cdedf137 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
-@@ -58,7 +58,7 @@ obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_nand.o
+@@ -59,7 +59,7 @@ obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_n
obj-$(CONFIG_MTD_NAND_HISI504) += hisi504_nand.o
obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand/
obj-$(CONFIG_MTD_NAND_QCOM) += qcom_nandc.o
nand-objs := nand_base.o nand_bbt.o nand_timings.o nand_ids.o
nand-objs += nand_amd.o
---
-2.11.0
-
Documentation/devicetree/bindings/mmc/mtk-sd.txt | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
-diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
-index 4182ea36ca5b..72d2a734ab85 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
-@@ -7,10 +7,18 @@ This file documents differences between the core properties in mmc.txt
+@@ -7,10 +7,18 @@ This file documents differences between
and the properties used by the msdc driver.
Required properties:
Examples:
mmc0: mmc@11230000 {
---
-2.11.0
-
drivers/mmc/host/mtk-sd.c | 82 +++++++++++++++++++++++++++++++++++++++--------
1 file changed, 69 insertions(+), 13 deletions(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index 267f7ab08420..643c795f1bdd 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -95,6 +95,9 @@
static void sdr_set_bits(void __iomem *reg, u32 bs)
{
u32 val = readl(reg);
-@@ -509,7 +542,12 @@ static void msdc_set_timeout(struct msdc_host *host, u32 ns, u32 clks)
+@@ -509,7 +542,12 @@ static void msdc_set_timeout(struct msdc
timeout = (ns + clk_ns - 1) / clk_ns + clks;
/* in 1048576 sclk cycle unit */
timeout = (timeout + (0x1 << 20) - 1) >> 20;
/*DDR mode will double the clk cycles for data timeout */
timeout = mode >= 2 ? timeout * 2 : timeout;
timeout = timeout > 1 ? timeout - 1 : 0;
-@@ -548,7 +586,11 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -548,7 +586,11 @@ static void msdc_set_mclk(struct msdc_ho
flags = readl(host->base + MSDC_INTEN);
sdr_clr_bits(host->base + MSDC_INTEN, flags);
if (timing == MMC_TIMING_UHS_DDR50 ||
timing == MMC_TIMING_MMC_DDR52 ||
timing == MMC_TIMING_MMC_HS400) {
-@@ -568,8 +610,12 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -568,8 +610,12 @@ static void msdc_set_mclk(struct msdc_ho
if (timing == MMC_TIMING_MMC_HS400 &&
hz >= (host->src_clk_freq >> 1)) {
sclk = host->src_clk_freq >> 1;
div = 0; /* div is ignore when bit18 is set */
}
-@@ -587,8 +633,15 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -587,8 +633,15 @@ static void msdc_set_mclk(struct msdc_ho
sclk = (host->src_clk_freq >> 2) / div;
}
}
sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_CKPDN);
while (!(readl(host->base + MSDC_CFG) & MSDC_CFG_CKSTB))
cpu_relax();
-@@ -1617,12 +1670,17 @@ static int msdc_drv_probe(struct platform_device *pdev)
+@@ -1617,12 +1670,17 @@ static int msdc_drv_probe(struct platfor
struct mmc_host *mmc;
struct msdc_host *host;
struct resource *res;
/* Allocate MMC host for this device */
mmc = mmc_alloc_host(sizeof(struct msdc_host), &pdev->dev);
if (!mmc)
-@@ -1686,11 +1744,15 @@ static int msdc_drv_probe(struct platform_device *pdev)
+@@ -1686,11 +1744,15 @@ static int msdc_drv_probe(struct platfor
msdc_of_property_parse(pdev, host);
host->dev = &pdev->dev;
mmc->caps |= MMC_CAP_ERASE | MMC_CAP_CMD23;
/* MMC core transfer sizes tunable parameters */
-@@ -1839,12 +1901,6 @@ static const struct dev_pm_ops msdc_dev_pm_ops = {
+@@ -1839,12 +1901,6 @@ static const struct dev_pm_ops msdc_dev_
SET_RUNTIME_PM_OPS(msdc_runtime_suspend, msdc_runtime_resume, NULL)
};
static struct platform_driver mt_msdc_driver = {
.probe = msdc_drv_probe,
.remove = msdc_drv_remove,
---
-2.11.0
-
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
-index cd977db7630c..19fc116346d6 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
@@ -7,6 +7,7 @@ Required Properties:
- "mediatek,mt6797-apmixedsys"
- "mediatek,mt8135-apmixedsys"
- "mediatek,mt8173-apmixedsys"
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt
-index 4137196dd686..4010e37c53a0 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt
@@ -7,6 +7,7 @@ Required Properties:
- #clock-cells: Must be 1
The bdpsys controller uses the common clk binding from
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
-index 047b11ae5f45..868bd51a98be 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
@@ -7,6 +7,7 @@ Required Properties:
- "mediatek,mt6797-imgsys", "syscon"
- "mediatek,mt8173-imgsys", "syscon"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
-index 58d58e2006b8..a3430cd96d0f 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
@@ -8,6 +8,7 @@ Required Properties:
- "mediatek,mt6797-infracfg", "syscon"
- "mediatek,mt8135-infracfg", "syscon"
- "mediatek,mt8173-infracfg", "syscon"
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,jpgdecsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,jpgdecsys.txt
-new file mode 100644
-index 000000000000..2df799cd06a7
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,jpgdecsys.txt
@@ -0,0 +1,22 @@
+ reg = <0 0x19000000 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt
-new file mode 100644
-index 000000000000..b8fb03f3613e
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt
@@ -0,0 +1,22 @@
+ reg = <0 0x10220000 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt
-new file mode 100644
-index 000000000000..859e67b416d5
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt
@@ -0,0 +1,22 @@
+ reg = <0 0x13000000 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
-index 70529e0b58e9..4eb8bbe15c01 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
@@ -7,6 +7,7 @@ Required Properties:
- "mediatek,mt6797-mmsys", "syscon"
- "mediatek,mt8173-mmsys", "syscon"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
-index e494366782aa..d9f092eb3550 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
@@ -8,6 +8,7 @@ Required Properties:
- "mediatek,mt8135-pericfg", "syscon"
- "mediatek,mt8173-pericfg", "syscon"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
-index ec93ecbb9f3c..2024fc909d69 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
@@ -7,6 +7,7 @@ Required Properties:
- "mediatek,mt6797-topckgen"
- "mediatek,mt8135-topckgen"
- "mediatek,mt8173-topckgen"
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
-index d150104f928a..ea40d05089f8 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
@@ -7,6 +7,7 @@ Required Properties:
- "mediatek,mt6797-vdecsys", "syscon"
- "mediatek,mt8173-vdecsys", "syscon"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
-index 8a93be643647..851545357e94 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
-@@ -6,6 +6,7 @@ The Mediatek vencsys controller provides various clocks to the system.
+@@ -6,6 +6,7 @@ The Mediatek vencsys controller provides
Required Properties:
- compatible: Should be one of:
- "mediatek,mt6797-vencsys", "syscon"
- "mediatek,mt8173-vencsys", "syscon"
- #clock-cells: Must be 1
---
-2.11.0
-
1 file changed, 427 insertions(+)
create mode 100644 include/dt-bindings/clock/mt2712-clk.h
-diff --git a/include/dt-bindings/clock/mt2712-clk.h b/include/dt-bindings/clock/mt2712-clk.h
-new file mode 100644
-index 000000000000..48a8e797a617
--- /dev/null
+++ b/include/dt-bindings/clock/mt2712-clk.h
@@ -0,0 +1,427 @@
+#define CLK_JPGDEC_NR_CLK 2
+
+#endif /* _DT_BINDINGS_CLK_MT2712_H */
---
-2.11.0
-
create mode 100644 drivers/clk/mediatek/clk-mt2712-venc.c
create mode 100644 drivers/clk/mediatek/clk-mt2712.c
-diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
-index 28739a9a6e37..300dbb551bf7 100644
--- a/drivers/clk/mediatek/Kconfig
+++ b/drivers/clk/mediatek/Kconfig
@@ -50,6 +50,56 @@ config COMMON_CLK_MT2701_BDPSYS
config COMMON_CLK_MT6797
bool "Clock driver for Mediatek MT6797"
depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
-diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile
-index 2a755b5fb51b..a4e5c47c73a4 100644
--- a/drivers/clk/mediatek/Makefile
+++ b/drivers/clk/mediatek/Makefile
-@@ -12,5 +12,13 @@ obj-$(CONFIG_COMMON_CLK_MT2701_HIFSYS) += clk-mt2701-hif.o
+@@ -13,5 +13,13 @@ obj-$(CONFIG_COMMON_CLK_MT2701_HIFSYS) +
obj-$(CONFIG_COMMON_CLK_MT2701_IMGSYS) += clk-mt2701-img.o
obj-$(CONFIG_COMMON_CLK_MT2701_MMSYS) += clk-mt2701-mm.o
obj-$(CONFIG_COMMON_CLK_MT2701_VDECSYS) += clk-mt2701-vdec.o
+obj-$(CONFIG_COMMON_CLK_MT2712_VENCSYS) += clk-mt2712-venc.o
obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o
obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o
-diff --git a/drivers/clk/mediatek/clk-mt2712-bdp.c b/drivers/clk/mediatek/clk-mt2712-bdp.c
-new file mode 100644
-index 000000000000..5fe4728c076e
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-bdp.c
@@ -0,0 +1,102 @@
+};
+
+builtin_platform_driver(clk_mt2712_bdp_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712-img.c b/drivers/clk/mediatek/clk-mt2712-img.c
-new file mode 100644
-index 000000000000..139ff55d495e
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-img.c
@@ -0,0 +1,80 @@
+};
+
+builtin_platform_driver(clk_mt2712_img_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712-jpgdec.c b/drivers/clk/mediatek/clk-mt2712-jpgdec.c
-new file mode 100644
-index 000000000000..c7d4aada4892
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-jpgdec.c
@@ -0,0 +1,76 @@
+};
+
+builtin_platform_driver(clk_mt2712_jpgdec_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712-mfg.c b/drivers/clk/mediatek/clk-mt2712-mfg.c
-new file mode 100644
-index 000000000000..570f72d48d4d
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-mfg.c
@@ -0,0 +1,75 @@
+};
+
+builtin_platform_driver(clk_mt2712_mfg_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712-mm.c b/drivers/clk/mediatek/clk-mt2712-mm.c
-new file mode 100644
-index 000000000000..a8b4b6d42488
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-mm.c
@@ -0,0 +1,170 @@
+};
+
+builtin_platform_driver(clk_mt2712_mm_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712-vdec.c b/drivers/clk/mediatek/clk-mt2712-vdec.c
-new file mode 100644
-index 000000000000..55c64ee8cc91
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-vdec.c
@@ -0,0 +1,94 @@
+};
+
+builtin_platform_driver(clk_mt2712_vdec_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712-venc.c b/drivers/clk/mediatek/clk-mt2712-venc.c
-new file mode 100644
-index 000000000000..ccbfe98777c8
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-venc.c
@@ -0,0 +1,77 @@
+};
+
+builtin_platform_driver(clk_mt2712_venc_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712.c b/drivers/clk/mediatek/clk-mt2712.c
-new file mode 100644
-index 000000000000..498d13799388
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712.c
@@ -0,0 +1,1435 @@
+}
+
+arch_initcall(clk_mt2712_init);
-diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
-index f5d6b70ce189..f48df75cc901 100644
--- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h
@@ -207,6 +207,8 @@ struct mtk_pll_data {
int pd_shift;
unsigned int flags;
const struct clk_ops *ops;
-diff --git a/drivers/clk/mediatek/clk-pll.c b/drivers/clk/mediatek/clk-pll.c
-index a409142e9346..3c546bae6955 100644
--- a/drivers/clk/mediatek/clk-pll.c
+++ b/drivers/clk/mediatek/clk-pll.c
@@ -47,6 +47,7 @@ struct mtk_clk_pll {
void __iomem *pcw_addr;
const struct mtk_pll_data *data;
};
-@@ -227,7 +228,10 @@ static int mtk_pll_prepare(struct clk_hw *hw)
+@@ -227,7 +228,10 @@ static int mtk_pll_prepare(struct clk_hw
r |= pll->data->en_mask;
writel(r, pll->base_addr + REG_CON0);
r = readl(pll->tuner_addr) | AUDPLL_TUNER_EN;
writel(r, pll->tuner_addr);
}
-@@ -254,7 +258,10 @@ static void mtk_pll_unprepare(struct clk_hw *hw)
+@@ -254,7 +258,10 @@ static void mtk_pll_unprepare(struct clk
writel(r, pll->base_addr + REG_CON0);
}
r = readl(pll->tuner_addr) & ~AUDPLL_TUNER_EN;
writel(r, pll->tuner_addr);
}
-@@ -297,6 +304,8 @@ static struct clk *mtk_clk_register_pll(const struct mtk_pll_data *data,
+@@ -297,6 +304,8 @@ static struct clk *mtk_clk_register_pll(
pll->pcw_addr = base + data->pcw_reg;
if (data->tuner_reg)
pll->tuner_addr = base + data->tuner_reg;
pll->hw.init = &init;
pll->data = data;
---
-2.11.0
-
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
-index 19fc116346d6..b404d592ce58 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
@@ -9,6 +9,7 @@ Required Properties:
- "mediatek,mt8135-apmixedsys"
- "mediatek,mt8173-apmixedsys"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
-new file mode 100644
-index 000000000000..9b8f578d5e19
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
@@ -0,0 +1,22 @@
+ reg = <0 0x11220000 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
-index 768f3a5bc055..7aa3fa167668 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
@@ -7,6 +7,7 @@ Required Properties:
- #clock-cells: Must be 1
The ethsys controller uses the common clk binding from
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
-index beed7b594cea..f5629d64cef2 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
@@ -8,6 +8,7 @@ Required Properties:
- #clock-cells: Must be 1
The hifsys controller uses the common clk binding from
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
-index a3430cd96d0f..566f153f9f83 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
@@ -10,6 +10,7 @@ Required Properties:
- "mediatek,mt8135-infracfg", "syscon"
- "mediatek,mt8173-infracfg", "syscon"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
-new file mode 100644
-index 000000000000..d5d5f1227665
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
@@ -0,0 +1,22 @@
+ reg = <0 0x1a100800 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
-index d9f092eb3550..fb58ca8c2770 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
@@ -9,6 +9,7 @@ Required Properties:
- "mediatek,mt8135-pericfg", "syscon"
- "mediatek,mt8173-pericfg", "syscon"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt
-new file mode 100644
-index 000000000000..d113b8e741f3
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt
@@ -0,0 +1,22 @@
+ reg = <0 0x1b128000 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
-new file mode 100644
-index 000000000000..00760019da00
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
@@ -0,0 +1,22 @@
+ reg = <0 0x1a000000 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
-index 2024fc909d69..24014a7e2332 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
@@ -9,6 +9,7 @@ Required Properties:
- "mediatek,mt8135-topckgen"
- "mediatek,mt8173-topckgen"
- #clock-cells: Must be 1
---
-2.11.0
-
1 file changed, 289 insertions(+)
create mode 100644 include/dt-bindings/clock/mt7622-clk.h
-diff --git a/include/dt-bindings/clock/mt7622-clk.h b/include/dt-bindings/clock/mt7622-clk.h
-new file mode 100644
-index 000000000000..3e514ed51d15
--- /dev/null
+++ b/include/dt-bindings/clock/mt7622-clk.h
@@ -0,0 +1,289 @@
+
+#endif /* _DT_BINDINGS_CLK_MT7622_H */
+
---
-2.11.0
-
create mode 100644 drivers/clk/mediatek/clk-mt7622-hif.c
create mode 100644 drivers/clk/mediatek/clk-mt7622.c
-diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
-index 300dbb551bf7..59dc0aad553c 100644
--- a/drivers/clk/mediatek/Kconfig
+++ b/drivers/clk/mediatek/Kconfig
@@ -132,6 +132,36 @@ config COMMON_CLK_MT6797_VENCSYS
config COMMON_CLK_MT8135
bool "Clock driver for Mediatek MT8135"
depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST
-diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile
-index a4e5c47c73a4..de8c3d0bb4ca 100644
--- a/drivers/clk/mediatek/Makefile
+++ b/drivers/clk/mediatek/Makefile
-@@ -20,5 +20,9 @@ obj-$(CONFIG_COMMON_CLK_MT2712_MFGCFG) += clk-mt2712-mfg.o
+@@ -21,5 +21,9 @@ obj-$(CONFIG_COMMON_CLK_MT2712_MFGCFG) +
obj-$(CONFIG_COMMON_CLK_MT2712_MMSYS) += clk-mt2712-mm.o
obj-$(CONFIG_COMMON_CLK_MT2712_VDECSYS) += clk-mt2712-vdec.o
obj-$(CONFIG_COMMON_CLK_MT2712_VENCSYS) += clk-mt2712-venc.o
+obj-$(CONFIG_COMMON_CLK_MT7622_AUDSYS) += clk-mt7622-aud.o
obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o
obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o
-diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
-new file mode 100644
-index 000000000000..fad7d9fc53ba
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7622-aud.c
@@ -0,0 +1,195 @@
+};
+
+builtin_platform_driver(clk_mt7622_aud_drv);
-diff --git a/drivers/clk/mediatek/clk-mt7622-eth.c b/drivers/clk/mediatek/clk-mt7622-eth.c
-new file mode 100644
-index 000000000000..6328127bbb3c
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7622-eth.c
@@ -0,0 +1,156 @@
+};
+
+builtin_platform_driver(clk_mt7622_eth_drv);
-diff --git a/drivers/clk/mediatek/clk-mt7622-hif.c b/drivers/clk/mediatek/clk-mt7622-hif.c
-new file mode 100644
-index 000000000000..a6e8534276c6
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7622-hif.c
@@ -0,0 +1,169 @@
+};
+
+builtin_platform_driver(clk_mt7622_hif_drv);
-diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
-new file mode 100644
-index 000000000000..92f7e32770c6
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -0,0 +1,780 @@
+}
+
+arch_initcall(clk_mt7622_init);
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
-diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
-index b99a27372965..26396ef53bde 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
-@@ -682,8 +682,7 @@
+@@ -684,8 +684,7 @@
};
mmc0: mmc@11230000 {
reg = <0 0x11230000 0 0x1000>;
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_0>,
-@@ -693,8 +692,7 @@
+@@ -695,8 +694,7 @@
};
mmc1: mmc@11240000 {
reg = <0 0x11240000 0 0x1000>;
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_1>,
-@@ -704,8 +702,7 @@
+@@ -706,8 +704,7 @@
};
mmc2: mmc@11250000 {
reg = <0 0x11250000 0 0x1000>;
interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_2>,
-@@ -715,8 +712,7 @@
+@@ -717,8 +714,7 @@
};
mmc3: mmc@11260000 {
reg = <0 0x11260000 0 0x1000>;
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_3>,
---
-2.11.0
-
drivers/mmc/host/mtk-sd.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index 643c795f1bdd..ab2fbbbdfda3 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -300,6 +300,7 @@ struct msdc_save_para {
};
static const struct of_device_id msdc_of_ids[] = {
-@@ -666,7 +671,8 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -666,7 +671,8 @@ static void msdc_set_mclk(struct msdc_ho
host->base + PAD_CMD_TUNE);
}
sdr_set_field(host->base + PAD_CMD_TUNE,
MSDC_PAD_TUNE_CMDRRDLY,
host->hs400_cmd_int_delay);
-@@ -1594,7 +1600,8 @@ static int msdc_execute_tuning(struct mmc_host *mmc, u32 opcode)
+@@ -1594,7 +1600,8 @@ static int msdc_execute_tuning(struct mm
struct msdc_host *host = mmc_priv(mmc);
int ret;
ret = hs400_tune_response(mmc, opcode);
else
ret = msdc_tune_response(mmc, opcode);
---
-2.11.0
-
drivers/mmc/host/mtk-sd.c | 51 ++++++++++++++++++++++++++++++-----------------
1 file changed, 33 insertions(+), 18 deletions(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index ab2fbbbdfda3..bcd83d6f2b86 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -75,6 +75,7 @@
};
static const struct of_device_id msdc_of_ids[] = {
-@@ -581,6 +587,7 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -581,6 +587,7 @@ static void msdc_set_mclk(struct msdc_ho
u32 flags;
u32 div;
u32 sclk;
if (!hz) {
dev_dbg(host->dev, "set mclk to 0\n");
-@@ -663,10 +670,10 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -663,10 +670,10 @@ static void msdc_set_mclk(struct msdc_ho
*/
if (host->sclk <= 52000000) {
writel(host->def_tune_para.iocon, host->base + MSDC_IOCON);
writel(host->saved_tune_para.pad_cmd_tune,
host->base + PAD_CMD_TUNE);
}
-@@ -1224,6 +1231,7 @@ static irqreturn_t msdc_irq(int irq, void *dev_id)
+@@ -1224,6 +1231,7 @@ static irqreturn_t msdc_irq(int irq, voi
static void msdc_init_hw(struct msdc_host *host)
{
u32 val;
/* Configure to MMC/SD mode, clock free running */
sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_MODE | MSDC_CFG_CKPDN);
-@@ -1239,7 +1247,7 @@ static void msdc_init_hw(struct msdc_host *host)
+@@ -1239,7 +1247,7 @@ static void msdc_init_hw(struct msdc_hos
val = readl(host->base + MSDC_INT);
writel(val, host->base + MSDC_INT);
writel(0, host->base + MSDC_IOCON);
sdr_set_field(host->base + MSDC_IOCON, MSDC_IOCON_DDLSEL, 0);
writel(0x403c0046, host->base + MSDC_PATCH_BIT);
-@@ -1259,7 +1267,7 @@ static void msdc_init_hw(struct msdc_host *host)
+@@ -1259,7 +1267,7 @@ static void msdc_init_hw(struct msdc_hos
sdr_set_field(host->base + SDC_CFG, SDC_CFG_DTOC, 3);
host->def_tune_para.iocon = readl(host->base + MSDC_IOCON);
dev_dbg(host->dev, "init hardware done!");
}
-@@ -1402,18 +1410,19 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1402,18 +1410,19 @@ static int msdc_tune_response(struct mmc
struct msdc_delay_phase internal_delay_phase;
u8 final_delay, final_maxlen;
u32 internal_delay = 0;
MSDC_PAD_TUNE_CMDRDLY, i);
/*
* Using the same parameters, it may sometimes pass the test,
-@@ -1437,7 +1446,7 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1437,7 +1446,7 @@ static int msdc_tune_response(struct mmc
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);
for (i = 0; i < PAD_DELAY_MAX; i++) {
MSDC_PAD_TUNE_CMDRDLY, i);
/*
* Using the same parameters, it may sometimes pass the test,
-@@ -1462,12 +1471,12 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1462,12 +1471,12 @@ skip_fall:
final_maxlen = final_fall_delay.maxlen;
if (final_maxlen == final_rise_delay.maxlen) {
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);
final_fall_delay.final_phase);
final_delay = final_fall_delay.final_phase;
}
-@@ -1475,7 +1484,7 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1475,7 +1484,7 @@ skip_fall:
goto skip_internal;
for (i = 0; i < PAD_DELAY_MAX; i++) {
MSDC_PAD_TUNE_CMDRRDLY, i);
mmc_send_tuning(mmc, opcode, &cmd_err);
if (!cmd_err)
-@@ -1483,7 +1492,7 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1483,7 +1492,7 @@ skip_fall:
}
dev_dbg(host->dev, "Final internal delay: 0x%x\n", internal_delay);
internal_delay_phase = get_best_delay(host, internal_delay);
internal_delay_phase.final_phase);
skip_internal:
dev_dbg(host->dev, "Final cmd pad delay: %x\n", final_delay);
-@@ -1545,12 +1554,13 @@ static int msdc_tune_data(struct mmc_host *mmc, u32 opcode)
+@@ -1545,12 +1554,13 @@ static int msdc_tune_data(struct mmc_hos
u32 rise_delay = 0, fall_delay = 0;
struct msdc_delay_phase final_rise_delay, final_fall_delay = { 0,};
u8 final_delay, final_maxlen;
MSDC_PAD_TUNE_DATRRDLY, i);
ret = mmc_send_tuning(mmc, opcode, NULL);
if (!ret)
-@@ -1565,7 +1575,7 @@ static int msdc_tune_data(struct mmc_host *mmc, u32 opcode)
+@@ -1565,7 +1575,7 @@ static int msdc_tune_data(struct mmc_hos
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_DSPL);
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_W_DSPL);
for (i = 0; i < PAD_DELAY_MAX; i++) {
MSDC_PAD_TUNE_DATRRDLY, i);
ret = mmc_send_tuning(mmc, opcode, NULL);
if (!ret)
-@@ -1578,14 +1588,14 @@ static int msdc_tune_data(struct mmc_host *mmc, u32 opcode)
+@@ -1578,14 +1588,14 @@ skip_fall:
if (final_maxlen == final_rise_delay.maxlen) {
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_DSPL);
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_W_DSPL);
MSDC_PAD_TUNE_DATRRDLY,
final_fall_delay.final_phase);
final_delay = final_fall_delay.final_phase;
-@@ -1599,6 +1609,7 @@ static int msdc_execute_tuning(struct mmc_host *mmc, u32 opcode)
+@@ -1599,6 +1609,7 @@ static int msdc_execute_tuning(struct mm
{
struct msdc_host *host = mmc_priv(mmc);
int ret;
if (host->hs400_mode &&
host->dev_comp->hs400_tune)
-@@ -1616,7 +1627,7 @@ static int msdc_execute_tuning(struct mmc_host *mmc, u32 opcode)
+@@ -1616,7 +1627,7 @@ static int msdc_execute_tuning(struct mm
}
host->saved_tune_para.iocon = readl(host->base + MSDC_IOCON);
host->saved_tune_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE);
return ret;
}
-@@ -1857,10 +1868,12 @@ static int msdc_drv_remove(struct platform_device *pdev)
+@@ -1857,10 +1868,12 @@ static int msdc_drv_remove(struct platfo
#ifdef CONFIG_PM
static void msdc_save_reg(struct msdc_host *host)
{
host->save_para.patch_bit0 = readl(host->base + MSDC_PATCH_BIT);
host->save_para.patch_bit1 = readl(host->base + MSDC_PATCH_BIT1);
host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE);
-@@ -1870,10 +1883,12 @@ static void msdc_save_reg(struct msdc_host *host)
+@@ -1870,10 +1883,12 @@ static void msdc_save_reg(struct msdc_ho
static void msdc_restore_reg(struct msdc_host *host)
{
writel(host->save_para.patch_bit0, host->base + MSDC_PATCH_BIT);
writel(host->save_para.patch_bit1, host->base + MSDC_PATCH_BIT1);
writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE);
---
-2.11.0
-
drivers/mmc/host/mtk-sd.c | 52 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 50 insertions(+), 2 deletions(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index bcd83d6f2b86..8113bacc1540 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -74,6 +74,7 @@
};
struct msdc_tune_para {
-@@ -365,24 +378,32 @@ static const struct mtk_mmc_compatible mt8135_compat = {
+@@ -365,24 +378,32 @@ static const struct mtk_mmc_compatible m
.clk_div_bits = 8,
.hs400_tune = false,
.pad_tune_reg = MSDC_PAD_TUNE,
};
static const struct of_device_id msdc_of_ids[] = {
-@@ -1252,8 +1273,29 @@ static void msdc_init_hw(struct msdc_host *host)
+@@ -1252,8 +1273,29 @@ static void msdc_init_hw(struct msdc_hos
sdr_set_field(host->base + MSDC_IOCON, MSDC_IOCON_DDLSEL, 0);
writel(0x403c0046, host->base + MSDC_PATCH_BIT);
sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1);
/* Configure to enable SDIO mode.
* it's must otherwise sdio cmd5 failed
-@@ -1268,6 +1310,8 @@ static void msdc_init_hw(struct msdc_host *host)
+@@ -1268,6 +1310,8 @@ static void msdc_init_hw(struct msdc_hos
host->def_tune_para.iocon = readl(host->base + MSDC_IOCON);
host->def_tune_para.pad_tune = readl(host->base + tune_reg);
dev_dbg(host->dev, "init hardware done!");
}
-@@ -1480,7 +1524,7 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1480,7 +1524,7 @@ skip_fall:
final_fall_delay.final_phase);
final_delay = final_fall_delay.final_phase;
}
goto skip_internal;
for (i = 0; i < PAD_DELAY_MAX; i++) {
-@@ -1638,6 +1682,8 @@ static int msdc_prepare_hs400_tuning(struct mmc_host *mmc, struct mmc_ios *ios)
+@@ -1638,6 +1682,8 @@ static int msdc_prepare_hs400_tuning(str
host->hs400_mode = true;
writel(host->hs400_ds_delay, host->base + PAD_DS_TUNE);
return 0;
}
-@@ -1876,6 +1922,7 @@ static void msdc_save_reg(struct msdc_host *host)
+@@ -1876,6 +1922,7 @@ static void msdc_save_reg(struct msdc_ho
host->save_para.pad_tune = readl(host->base + tune_reg);
host->save_para.patch_bit0 = readl(host->base + MSDC_PATCH_BIT);
host->save_para.patch_bit1 = readl(host->base + MSDC_PATCH_BIT1);
host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE);
host->save_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE);
host->save_para.emmc50_cfg0 = readl(host->base + EMMC50_CFG0);
-@@ -1891,6 +1938,7 @@ static void msdc_restore_reg(struct msdc_host *host)
+@@ -1891,6 +1938,7 @@ static void msdc_restore_reg(struct msdc
writel(host->save_para.pad_tune, host->base + tune_reg);
writel(host->save_para.patch_bit0, host->base + MSDC_PATCH_BIT);
writel(host->save_para.patch_bit1, host->base + MSDC_PATCH_BIT1);
writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE);
writel(host->save_para.pad_cmd_tune, host->base + PAD_CMD_TUNE);
writel(host->save_para.emmc50_cfg0, host->base + EMMC50_CFG0);
---
-2.11.0
-
drivers/mmc/host/mtk-sd.c | 7 +++++++
1 file changed, 7 insertions(+)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index 8113bacc1540..eceaee86ba4d 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -316,6 +316,7 @@ struct mtk_mmc_compatible {
};
struct msdc_tune_para {
-@@ -380,6 +381,7 @@ static const struct mtk_mmc_compatible mt8135_compat = {
+@@ -380,6 +381,7 @@ static const struct mtk_mmc_compatible m
.pad_tune_reg = MSDC_PAD_TUNE,
.async_fifo = false,
.data_tune = false,
};
static const struct mtk_mmc_compatible mt8173_compat = {
-@@ -388,6 +390,7 @@ static const struct mtk_mmc_compatible mt8173_compat = {
+@@ -388,6 +390,7 @@ static const struct mtk_mmc_compatible m
.pad_tune_reg = MSDC_PAD_TUNE,
.async_fifo = false,
.data_tune = false,
};
static const struct mtk_mmc_compatible mt2701_compat = {
-@@ -396,6 +399,7 @@ static const struct mtk_mmc_compatible mt2701_compat = {
+@@ -396,6 +399,7 @@ static const struct mtk_mmc_compatible m
.pad_tune_reg = MSDC_PAD_TUNE0,
.async_fifo = true,
.data_tune = true,
};
static const struct mtk_mmc_compatible mt2712_compat = {
-@@ -404,6 +408,7 @@ static const struct mtk_mmc_compatible mt2712_compat = {
+@@ -404,6 +408,7 @@ static const struct mtk_mmc_compatible m
.pad_tune_reg = MSDC_PAD_TUNE0,
.async_fifo = true,
.data_tune = true,
};
static const struct of_device_id msdc_of_ids[] = {
-@@ -1275,6 +1280,8 @@ static void msdc_init_hw(struct msdc_host *host)
+@@ -1275,6 +1280,8 @@ static void msdc_init_hw(struct msdc_hos
sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1);
writel(0xffff4089, host->base + MSDC_PATCH_BIT1);
sdr_set_bits(host->base + EMMC50_CFG0, EMMC50_CFG_CFCSTS_SEL);
if (host->dev_comp->async_fifo) {
sdr_set_field(host->base + MSDC_PATCH_BIT2,
MSDC_PB2_RESPWAIT, 3);
---
-2.11.0
-
drivers/mmc/host/mtk-sd.c | 47 +++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 43 insertions(+), 4 deletions(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index eceaee86ba4d..94d16a3a8d94 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -67,6 +67,7 @@
};
struct msdc_tune_para {
-@@ -382,6 +395,8 @@ static const struct mtk_mmc_compatible mt8135_compat = {
+@@ -382,6 +395,8 @@ static const struct mtk_mmc_compatible m
.async_fifo = false,
.data_tune = false,
.busy_check = false,
};
static const struct mtk_mmc_compatible mt8173_compat = {
-@@ -391,6 +406,8 @@ static const struct mtk_mmc_compatible mt8173_compat = {
+@@ -391,6 +406,8 @@ static const struct mtk_mmc_compatible m
.async_fifo = false,
.data_tune = false,
.busy_check = false,
};
static const struct mtk_mmc_compatible mt2701_compat = {
-@@ -400,6 +417,8 @@ static const struct mtk_mmc_compatible mt2701_compat = {
+@@ -400,6 +417,8 @@ static const struct mtk_mmc_compatible m
.async_fifo = true,
.data_tune = true,
.busy_check = false,
};
static const struct mtk_mmc_compatible mt2712_compat = {
-@@ -409,6 +428,8 @@ static const struct mtk_mmc_compatible mt2712_compat = {
+@@ -409,6 +428,8 @@ static const struct mtk_mmc_compatible m
.async_fifo = true,
.data_tune = true,
.busy_check = true,
};
static const struct of_device_id msdc_of_ids[] = {
-@@ -1280,15 +1301,31 @@ static void msdc_init_hw(struct msdc_host *host)
+@@ -1280,15 +1301,31 @@ static void msdc_init_hw(struct msdc_hos
sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1);
writel(0xffff4089, host->base + MSDC_PATCH_BIT1);
sdr_set_bits(host->base + EMMC50_CFG0, EMMC50_CFG_CFCSTS_SEL);
/* use async fifo, then no need tune internal delay */
sdr_clr_bits(host->base + MSDC_PATCH_BIT2,
MSDC_PATCH_BIT2_CFGRESP);
-@@ -1933,6 +1970,7 @@ static void msdc_save_reg(struct msdc_host *host)
+@@ -1933,6 +1970,7 @@ static void msdc_save_reg(struct msdc_ho
host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE);
host->save_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE);
host->save_para.emmc50_cfg0 = readl(host->base + EMMC50_CFG0);
}
static void msdc_restore_reg(struct msdc_host *host)
-@@ -1949,6 +1987,7 @@ static void msdc_restore_reg(struct msdc_host *host)
+@@ -1949,6 +1987,7 @@ static void msdc_restore_reg(struct msdc
writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE);
writel(host->save_para.pad_cmd_tune, host->base + PAD_CMD_TUNE);
writel(host->save_para.emmc50_cfg0, host->base + EMMC50_CFG0);
}
static int msdc_runtime_suspend(struct device *dev)
---
-2.11.0
-
drivers/mmc/host/mtk-sd.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index 94d16a3a8d94..a2f26c9b17b4 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -372,6 +372,7 @@ struct msdc_host {
u32 mclk; /* mmc subsystem clock frequency */
u32 src_clk_freq; /* source clock frequency */
u32 sclk; /* SD/MS bus clock frequency */
-@@ -616,6 +617,7 @@ static void msdc_set_timeout(struct msdc_host *host, u32 ns, u32 clks)
+@@ -616,6 +617,7 @@ static void msdc_set_timeout(struct msdc
static void msdc_gate_clock(struct msdc_host *host)
{
clk_disable_unprepare(host->src_clk);
clk_disable_unprepare(host->h_clk);
}
-@@ -624,6 +626,7 @@ static void msdc_ungate_clock(struct msdc_host *host)
+@@ -624,6 +626,7 @@ static void msdc_ungate_clock(struct msd
{
clk_prepare_enable(host->h_clk);
clk_prepare_enable(host->src_clk);
while (!(readl(host->base + MSDC_CFG) & MSDC_CFG_CKSTB))
cpu_relax();
}
-@@ -692,6 +695,15 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -692,6 +695,15 @@ static void msdc_set_mclk(struct msdc_ho
sclk = (host->src_clk_freq >> 2) / div;
}
}
if (host->dev_comp->clk_div_bits == 8)
sdr_set_field(host->base + MSDC_CFG,
MSDC_CFG_CKMOD | MSDC_CFG_CKDIV,
-@@ -700,10 +712,14 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -700,10 +712,14 @@ static void msdc_set_mclk(struct msdc_ho
sdr_set_field(host->base + MSDC_CFG,
MSDC_CFG_CKMOD_EXTRA | MSDC_CFG_CKDIV_EXTRA,
(mode << 12) | div);
host->sclk = sclk;
host->mclk = hz;
host->timing = timing;
-@@ -1822,6 +1838,11 @@ static int msdc_drv_probe(struct platform_device *pdev)
+@@ -1822,6 +1838,11 @@ static int msdc_drv_probe(struct platfor
goto host_free;
}
host->irq = platform_get_irq(pdev, 0);
if (host->irq < 0) {
ret = -EINVAL;
---
-2.11.0
-
drivers/mmc/host/mtk-sd.c | 6 ++++++
1 file changed, 6 insertions(+)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index a2f26c9b17b4..d75a93d6803f 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -378,6 +378,7 @@ struct msdc_host {
u32 hs400_ds_delay;
u32 hs200_cmd_int_delay; /* cmd internal delay for HS200/SDR104 */
u32 hs400_cmd_int_delay; /* cmd internal delay for HS400 */
-@@ -1661,6 +1662,8 @@ static int msdc_tune_data(struct mmc_host *mmc, u32 opcode)
+@@ -1661,6 +1662,8 @@ static int msdc_tune_data(struct mmc_hos
u32 tune_reg = host->dev_comp->pad_tune_reg;
int i, ret;
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_DSPL);
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_W_DSPL);
for (i = 0 ; i < PAD_DELAY_MAX; i++) {
-@@ -1773,6 +1776,9 @@ static const struct mmc_host_ops mt_msdc_ops = {
+@@ -1773,6 +1776,9 @@ static const struct mmc_host_ops mt_msdc
static void msdc_of_property_parse(struct platform_device *pdev,
struct msdc_host *host)
{
of_property_read_u32(pdev->dev.of_node, "hs400-ds-delay",
&host->hs400_ds_delay);
---
-2.11.0
-
drivers/mmc/host/mtk-sd.c | 9 +++++++++
1 file changed, 9 insertions(+)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index d75a93d6803f..95759bba0dd0 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -81,6 +81,7 @@
u32 sdc_fifo_cfg;
};
-@@ -1747,6 +1751,9 @@ static int msdc_prepare_hs400_tuning(struct mmc_host *mmc, struct mmc_ios *ios)
+@@ -1747,6 +1751,9 @@ static int msdc_prepare_hs400_tuning(str
writel(host->hs400_ds_delay, host->base + PAD_DS_TUNE);
/* hs400 mode must set it to 0 */
sdr_clr_bits(host->base + MSDC_PATCH_BIT2, MSDC_PATCH_BIT2_CFGCRCSTS);
return 0;
}
-@@ -1997,6 +2004,7 @@ static void msdc_save_reg(struct msdc_host *host)
+@@ -1997,6 +2004,7 @@ static void msdc_save_reg(struct msdc_ho
host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE);
host->save_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE);
host->save_para.emmc50_cfg0 = readl(host->base + EMMC50_CFG0);
host->save_para.sdc_fifo_cfg = readl(host->base + SDC_FIFO_CFG);
}
-@@ -2014,6 +2022,7 @@ static void msdc_restore_reg(struct msdc_host *host)
+@@ -2014,6 +2022,7 @@ static void msdc_restore_reg(struct msdc
writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE);
writel(host->save_para.pad_cmd_tune, host->base + PAD_CMD_TUNE);
writel(host->save_para.emmc50_cfg0, host->base + EMMC50_CFG0);
writel(host->save_para.sdc_fifo_cfg, host->base + SDC_FIFO_CFG);
}
---
-2.11.0
-
drivers/mmc/host/mtk-sd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index 95759bba0dd0..27a62254f12f 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
-@@ -1550,7 +1550,8 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1550,7 +1550,8 @@ static int msdc_tune_response(struct mmc
}
final_rise_delay = get_best_delay(host, rise_delay);
/* if rising edge has enough margin, then do not scan falling edge */
goto skip_fall;
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);
---
-2.11.0
-
drivers/pwm/pwm-mediatek.c | 53 ++++++++++++++++++++++++++++++++++++++--------
1 file changed, 44 insertions(+), 9 deletions(-)
-diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c
-index b52f3afb2ba1..f5d97e0ad52b 100644
--- a/drivers/pwm/pwm-mediatek.c
+++ b/drivers/pwm/pwm-mediatek.c
@@ -16,6 +16,7 @@
static inline struct mtk_pwm_chip *to_mtk_pwm_chip(struct pwm_chip *chip)
{
return container_of(chip, struct mtk_pwm_chip, chip);
-@@ -103,14 +116,14 @@ static void mtk_pwm_clk_disable(struct pwm_chip *chip, struct pwm_device *pwm)
+@@ -103,14 +116,14 @@ static void mtk_pwm_clk_disable(struct p
static inline u32 mtk_pwm_readl(struct mtk_pwm_chip *chip, unsigned int num,
unsigned int offset)
{
}
static int mtk_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
-@@ -185,6 +198,7 @@ static const struct pwm_ops mtk_pwm_ops = {
+@@ -185,6 +198,7 @@ static const struct pwm_ops mtk_pwm_ops
static int mtk_pwm_probe(struct platform_device *pdev)
{
struct mtk_pwm_chip *pc;
struct resource *res;
unsigned int i;
-@@ -194,15 +208,22 @@ static int mtk_pwm_probe(struct platform_device *pdev)
+@@ -194,15 +208,22 @@ static int mtk_pwm_probe(struct platform
if (!pc)
return -ENOMEM;
}
platform_set_drvdata(pdev, pc);
-@@ -210,7 +231,7 @@ static int mtk_pwm_probe(struct platform_device *pdev)
+@@ -210,7 +231,7 @@ static int mtk_pwm_probe(struct platform
pc->chip.dev = &pdev->dev;
pc->chip.ops = &mtk_pwm_ops;
pc->chip.base = -1;
ret = pwmchip_add(&pc->chip);
if (ret < 0) {
-@@ -228,9 +249,23 @@ static int mtk_pwm_remove(struct platform_device *pdev)
+@@ -228,9 +249,23 @@ static int mtk_pwm_remove(struct platfor
return pwmchip_remove(&pc->chip);
}
};
MODULE_DEVICE_TABLE(of, mtk_pwm_of_match);
---
-2.11.0
-
drivers/mtd/nand/mtk_nand.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
-diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
-index d86a7d131cc0..6d0101e13ef6 100644
--- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c
-@@ -1540,7 +1540,6 @@ static int mtk_nfc_resume(struct device *dev)
+@@ -1540,7 +1540,6 @@ static int mtk_nfc_resume(struct device
struct mtk_nfc *nfc = dev_get_drvdata(dev);
struct mtk_nfc_nand_chip *chip;
struct nand_chip *nand;
int ret;
u32 i;
-@@ -1553,11 +1552,8 @@ static int mtk_nfc_resume(struct device *dev)
+@@ -1553,11 +1552,8 @@ static int mtk_nfc_resume(struct device
/* reset NAND chip if VCC was powered off */
list_for_each_entry(chip, &nfc->chips, node) {
nand = &chip->nand;
}
return 0;
---
-2.11.0
-
drivers/cpufreq/mediatek-cpufreq.c | 1 +
1 file changed, 1 insertion(+)
-diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
-index 18c4bd9a5c65..62aec5cdbb26 100644
--- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c
-@@ -574,6 +574,7 @@ static struct platform_driver mtk_cpufreq_platdrv = {
+@@ -574,6 +574,7 @@ static struct platform_driver mtk_cpufre
/* List of machines supported by this driver */
static const struct of_device_id mtk_cpufreq_machines[] __initconst = {
{ .compatible = "mediatek,mt2701", },
{ .compatible = "mediatek,mt7622", },
{ .compatible = "mediatek,mt7623", },
{ .compatible = "mediatek,mt817x", },
---
-2.11.0
-
Documentation/devicetree/bindings/mtd/mtk-nand.txt | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
-diff --git a/Documentation/devicetree/bindings/mtd/mtk-nand.txt b/Documentation/devicetree/bindings/mtd/mtk-nand.txt
-index dbf9e054c11c..0025bc4c94a0 100644
--- a/Documentation/devicetree/bindings/mtd/mtk-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/mtk-nand.txt
@@ -12,8 +12,10 @@ tree nodes.
- reg: Base physical address and size of ECC.
- interrupts: Interrupts of ECC.
- clocks: ECC required clocks.
---
-2.11.0
-
drivers/mtd/nand/mtk_nand.c | 27 ++++++++----
3 files changed, 89 insertions(+), 41 deletions(-)
-diff --git a/drivers/mtd/nand/mtk_ecc.c b/drivers/mtd/nand/mtk_ecc.c
-index c51d214d169e..6610eefaa92b 100644
--- a/drivers/mtd/nand/mtk_ecc.c
+++ b/drivers/mtd/nand/mtk_ecc.c
@@ -34,34 +34,28 @@
int pg_irq_sel;
};
-@@ -89,6 +83,33 @@ static const u8 ecc_strength_mt2712[] = {
+@@ -89,6 +83,33 @@ static const u8 ecc_strength_mt2712[] =
40, 44, 48, 52, 56, 60, 68, 72, 80
};
static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc,
enum mtk_ecc_operation op)
{
-@@ -107,32 +128,30 @@ static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc,
+@@ -107,32 +128,30 @@ static inline void mtk_ecc_wait_idle(str
static irqreturn_t mtk_ecc_irq(int irq, void *id)
{
struct mtk_ecc *ecc = id;
}
return IRQ_HANDLED;
-@@ -160,7 +179,7 @@ static int mtk_ecc_config(struct mtk_ecc *ecc, struct mtk_ecc_config *config)
+@@ -160,7 +179,7 @@ static int mtk_ecc_config(struct mtk_ecc
/* configure ECC encoder (in bits) */
enc_sz = config->len << 3;
reg |= (enc_sz << ECC_MS_SHIFT);
writel(reg, ecc->regs + ECC_ENCCNFG);
-@@ -171,9 +190,9 @@ static int mtk_ecc_config(struct mtk_ecc *ecc, struct mtk_ecc_config *config)
+@@ -171,9 +190,9 @@ static int mtk_ecc_config(struct mtk_ecc
} else {
/* configure ECC decoder (in bits) */
dec_sz = (config->len << 3) +
reg |= (dec_sz << ECC_MS_SHIFT) | DEC_CNFG_CORRECT;
reg |= DEC_EMPTY_EN;
writel(reg, ecc->regs + ECC_DECCNFG);
-@@ -291,7 +310,12 @@ int mtk_ecc_enable(struct mtk_ecc *ecc, struct mtk_ecc_config *config)
+@@ -291,7 +310,12 @@ int mtk_ecc_enable(struct mtk_ecc *ecc,
*/
if (ecc->caps->pg_irq_sel && config->mode == ECC_NFI_MODE)
reg_val |= ECC_PG_IRQ_SEL;
}
writew(ECC_OP_ENABLE, ecc->regs + ECC_CTL_REG(op));
-@@ -310,13 +334,17 @@ void mtk_ecc_disable(struct mtk_ecc *ecc)
+@@ -310,13 +334,17 @@ void mtk_ecc_disable(struct mtk_ecc *ecc
/* disable it */
mtk_ecc_wait_idle(ecc, op);
writew(ECC_OP_DISABLE, ecc->regs + ECC_CTL_REG(op));
mutex_unlock(&ecc->lock);
-@@ -367,11 +395,11 @@ int mtk_ecc_encode(struct mtk_ecc *ecc, struct mtk_ecc_config *config,
+@@ -367,11 +395,11 @@ int mtk_ecc_encode(struct mtk_ecc *ecc,
mtk_ecc_wait_idle(ecc, ECC_ENCODE);
/* Program ECC bytes to OOB: per sector oob = FDM + ECC + SPARE */
round_up(len, 4));
/* copy into possibly unaligned OOB region with actual length */
-@@ -404,19 +432,29 @@ void mtk_ecc_adjust_strength(struct mtk_ecc *ecc, u32 *p)
+@@ -404,19 +432,29 @@ void mtk_ecc_adjust_strength(struct mtk_
}
EXPORT_SYMBOL(mtk_ecc_adjust_strength);
.pg_irq_sel = 1,
};
-@@ -452,7 +490,7 @@ static int mtk_ecc_probe(struct platform_device *pdev)
+@@ -452,7 +490,7 @@ static int mtk_ecc_probe(struct platform
max_eccdata_size = ecc->caps->num_ecc_strength - 1;
max_eccdata_size = ecc->caps->ecc_strength[max_eccdata_size];
max_eccdata_size = round_up(max_eccdata_size, 4);
ecc->eccdata = devm_kzalloc(dev, max_eccdata_size, GFP_KERNEL);
if (!ecc->eccdata)
-diff --git a/drivers/mtd/nand/mtk_ecc.h b/drivers/mtd/nand/mtk_ecc.h
-index d245c14f1b80..a455df080952 100644
--- a/drivers/mtd/nand/mtk_ecc.h
+++ b/drivers/mtd/nand/mtk_ecc.h
@@ -14,8 +14,6 @@
enum mtk_ecc_mode {ECC_DMA_MODE = 0, ECC_NFI_MODE = 1};
enum mtk_ecc_operation {ECC_ENCODE, ECC_DECODE};
-@@ -43,6 +41,7 @@ int mtk_ecc_wait_done(struct mtk_ecc *, enum mtk_ecc_operation);
+@@ -43,6 +41,7 @@ int mtk_ecc_wait_done(struct mtk_ecc *,
int mtk_ecc_enable(struct mtk_ecc *, struct mtk_ecc_config *);
void mtk_ecc_disable(struct mtk_ecc *);
void mtk_ecc_adjust_strength(struct mtk_ecc *ecc, u32 *p);
struct mtk_ecc *of_mtk_ecc_get(struct device_node *);
void mtk_ecc_release(struct mtk_ecc *);
-diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
-index 6d0101e13ef6..7349aa846f9a 100644
--- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c
@@ -97,7 +97,6 @@
};
struct mtk_nfc_bad_mark_ctl {
-@@ -450,7 +451,7 @@ static inline u8 mtk_nfc_read_byte(struct mtd_info *mtd)
+@@ -450,7 +451,7 @@ static inline u8 mtk_nfc_read_byte(struc
* set to max sector to allow the HW to continue reading over
* unaligned accesses
*/
nfi_writel(nfc, reg, NFI_CON);
/* trigger to fetch data */
-@@ -481,7 +482,7 @@ static void mtk_nfc_write_byte(struct mtd_info *mtd, u8 byte)
+@@ -481,7 +482,7 @@ static void mtk_nfc_write_byte(struct mt
reg = nfi_readw(nfc, NFI_CNFG) | CNFG_BYTE_RW;
nfi_writew(nfc, reg, NFI_CNFG);
nfi_writel(nfc, reg, NFI_CON);
nfi_writew(nfc, STAR_EN, NFI_STRDATA);
-@@ -1126,9 +1127,11 @@ static void mtk_nfc_set_fdm(struct mtk_nfc_fdm *fdm, struct mtd_info *mtd)
+@@ -1126,9 +1127,11 @@ static void mtk_nfc_set_fdm(struct mtk_n
{
struct nand_chip *nand = mtd_to_nand(mtd);
struct mtk_nfc_nand_chip *chip = to_mtk_nand(nand);
fdm->reg_size = chip->spare_per_sector - ecc_bytes;
if (fdm->reg_size > NFI_FDM_MAX_SIZE)
-@@ -1208,7 +1211,8 @@ static int mtk_nfc_ecc_init(struct device *dev, struct mtd_info *mtd)
+@@ -1208,7 +1211,8 @@ static int mtk_nfc_ecc_init(struct devic
* this controller only supports 512 and 1024 sizes
*/
if (nand->ecc.size < 1024) {
nand->ecc.size = 1024;
nand->ecc.strength <<= 1;
} else {
-@@ -1223,7 +1227,8 @@ static int mtk_nfc_ecc_init(struct device *dev, struct mtd_info *mtd)
+@@ -1223,7 +1227,8 @@ static int mtk_nfc_ecc_init(struct devic
return ret;
/* calculate oob bytes except ecc parity data */
free = spare - free;
/*
-@@ -1233,10 +1238,12 @@ static int mtk_nfc_ecc_init(struct device *dev, struct mtd_info *mtd)
+@@ -1233,10 +1238,12 @@ static int mtk_nfc_ecc_init(struct devic
*/
if (free > NFI_FDM_MAX_SIZE) {
spare -= NFI_FDM_MAX_SIZE;
}
}
-@@ -1389,6 +1396,8 @@ static const struct mtk_nfc_caps mtk_nfc_caps_mt2701 = {
+@@ -1389,6 +1396,8 @@ static const struct mtk_nfc_caps mtk_nfc
.num_spare_size = 16,
.pageformat_spare_shift = 4,
.nfi_clk_div = 1,
};
static const struct mtk_nfc_caps mtk_nfc_caps_mt2712 = {
-@@ -1396,6 +1405,8 @@ static const struct mtk_nfc_caps mtk_nfc_caps_mt2712 = {
+@@ -1396,6 +1405,8 @@ static const struct mtk_nfc_caps mtk_nfc
.num_spare_size = 19,
.pageformat_spare_shift = 16,
.nfi_clk_div = 2,
};
static const struct of_device_id mtk_nfc_id_table[] = {
---
-2.11.0
-
drivers/mtd/nand/mtk_nand.c | 16 ++++++++++++++++
2 files changed, 42 insertions(+)
-diff --git a/drivers/mtd/nand/mtk_ecc.c b/drivers/mtd/nand/mtk_ecc.c
-index 6610eefaa92b..40d86a861a70 100644
--- a/drivers/mtd/nand/mtk_ecc.c
+++ b/drivers/mtd/nand/mtk_ecc.c
-@@ -83,6 +83,10 @@ static const u8 ecc_strength_mt2712[] = {
+@@ -83,6 +83,10 @@ static const u8 ecc_strength_mt2712[] =
40, 44, 48, 52, 56, 60, 68, 72, 80
};
static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc,
enum mtk_ecc_operation op)
{
-@@ -458,6 +471,16 @@ static const struct mtk_ecc_caps mtk_ecc_caps_mt2712 = {
+@@ -458,6 +471,16 @@ static const struct mtk_ecc_caps mtk_ecc
.pg_irq_sel = 1,
};
static const struct of_device_id mtk_ecc_dt_match[] = {
{
.compatible = "mediatek,mt2701-ecc",
-@@ -465,6 +488,9 @@ static const struct of_device_id mtk_ecc_dt_match[] = {
+@@ -465,6 +488,9 @@ static const struct of_device_id mtk_ecc
}, {
.compatible = "mediatek,mt2712-ecc",
.data = &mtk_ecc_caps_mt2712,
},
{},
};
-diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
-index 7349aa846f9a..8f71b405d639 100644
--- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c
@@ -174,6 +174,10 @@ static const u8 spare_size_mt2712[] = {
static inline struct mtk_nfc_nand_chip *to_mtk_nand(struct nand_chip *nand)
{
return container_of(nand, struct mtk_nfc_nand_chip, nand);
-@@ -1409,6 +1413,15 @@ static const struct mtk_nfc_caps mtk_nfc_caps_mt2712 = {
+@@ -1409,6 +1413,15 @@ static const struct mtk_nfc_caps mtk_nfc
.max_sector_size = 1024,
};
static const struct of_device_id mtk_nfc_id_table[] = {
{
.compatible = "mediatek,mt2701-nfc",
-@@ -1416,6 +1429,9 @@ static const struct of_device_id mtk_nfc_id_table[] = {
+@@ -1416,6 +1429,9 @@ static const struct of_device_id mtk_nfc
}, {
.compatible = "mediatek,mt2712-nfc",
.data = &mtk_nfc_caps_mt2712,
},
{}
};
---
-2.11.0
-
Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
1 file changed, 2 insertions(+)
-diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
-index 72d2a734ab85..9b8017670870 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -12,6 +12,8 @@ Required properties:
- reg: physical base address of the controller and length
- interrupts: Should contain MSDC interrupt number
- clocks: Should contain phandle for the clock feeding the MMC controller
---
-2.11.0
-
1 file changed, 351 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
-diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
-new file mode 100644
-index 000000000000..f18ed99f6e14
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
@@ -0,0 +1,351 @@
+ };
+ };
+ };
---
-2.11.0
-
drivers/pinctrl/mediatek/Kconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
-diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
-index fac9866311f3..03b3023d5fe5 100644
--- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig
@@ -1,4 +1,5 @@
-endif
+endmenu
---
-2.11.0
-
4 files changed, 1608 insertions(+), 2 deletions(-)
create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt7622.c
-diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
-index c16e27900dbb..3a798d5b0900 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
-@@ -63,5 +63,5 @@ obj-$(CONFIG_PINCTRL_SUNXI) += sunxi/
+@@ -64,5 +64,5 @@ obj-$(CONFIG_PINCTRL_SUNXI) += sunxi/
obj-y += ti/
obj-$(CONFIG_PINCTRL_UNIPHIER) += uniphier/
obj-$(CONFIG_ARCH_VT8500) += vt8500/
-obj-$(CONFIG_PINCTRL_MTK) += mediatek/
+obj-y += mediatek/
obj-$(CONFIG_PINCTRL_ZX) += zte/
-diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
-index 03b3023d5fe5..3e598740b379 100644
--- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig
@@ -32,6 +32,16 @@ config PINCTRL_MT8127
config PINCTRL_MT8173
bool "Mediatek MT8173 pin control"
depends on OF
-diff --git a/drivers/pinctrl/mediatek/Makefile b/drivers/pinctrl/mediatek/Makefile
-index e59c613d4ddd..6e3ca6bbda7a 100644
--- a/drivers/pinctrl/mediatek/Makefile
+++ b/drivers/pinctrl/mediatek/Makefile
-@@ -1,9 +1,10 @@
+@@ -1,10 +1,11 @@
+ # SPDX-License-Identifier: GPL-2.0
# Core
-obj-y += pinctrl-mtk-common.o
+obj-$(CONFIG_PINCTRL_MTK) += pinctrl-mtk-common.o
+obj-$(CONFIG_PINCTRL_MT7622) += pinctrl-mt7622.o
obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o
obj-$(CONFIG_PINCTRL_MT6397) += pinctrl-mt6397.o
-diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
-new file mode 100644
-index 000000000000..3824d82888ac
--- /dev/null
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
@@ -0,0 +1,1595 @@
+ return platform_driver_register(&mtk_pinctrl_driver);
+}
+arch_initcall(mtk_pinctrl_init);
---
-2.11.0
-
drivers/clk/mediatek/Kconfig | 96 +++++++++++++++++++++++---------------------
1 file changed, 50 insertions(+), 46 deletions(-)
-diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
-index 59dc0aad553c..7338f816c603 100644
--- a/drivers/clk/mediatek/Kconfig
+++ b/drivers/clk/mediatek/Kconfig
@@ -1,136 +1,139 @@
- This driver supports Mediatek MT8173 clocks.
+ This driver supports MediaTek MT8173 clocks.
+endmenu
---
-2.11.0
-
drivers/clk/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
-index c99f363826f0..838000f92b69 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
-@@ -66,7 +66,7 @@ obj-$(CONFIG_ARCH_MXC) += imx/
+@@ -67,7 +67,7 @@ obj-$(CONFIG_ARCH_MXC) += imx/
obj-$(CONFIG_MACH_INGENIC) += ingenic/
obj-$(CONFIG_ARCH_KEYSTONE) += keystone/
obj-$(CONFIG_MACH_LOONGSON32) += loongson1/
obj-$(CONFIG_COMMON_CLK_AMLOGIC) += meson/
obj-$(CONFIG_MACH_PIC32) += microchip/
ifeq ($(CONFIG_COMMON_CLK), y)
---
-2.11.0
-
Documentation/devicetree/bindings/net/mediatek-net.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/Documentation/devicetree/bindings/net/mediatek-net.txt b/Documentation/devicetree/bindings/net/mediatek-net.txt
-index 214eaa9a6683..53c13ee384a4 100644
--- a/Documentation/devicetree/bindings/net/mediatek-net.txt
+++ b/Documentation/devicetree/bindings/net/mediatek-net.txt
@@ -28,7 +28,7 @@ Required properties:
Optional properties:
- interrupt-parent: Should be the phandle for the interrupt controller
---
-2.11.0
-
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 3 +++
2 files changed, 24 insertions(+), 14 deletions(-)
-Index: linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-===================================================================
---- linux-4.14.37.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1976,14 +1976,16 @@ static int mtk_hw_init(struct mtk_eth *e
}
regmap_write(eth->ethsys, ETHSYS_SYSCFG0, val);
};
const struct of_device_id of_mtk_match[] = {
-Index: linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-===================================================================
---- linux-4.14.37.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-+++ linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -574,10 +574,13 @@ struct mtk_rx_ring {
* @caps Flags shown the extra capability for the SoC
* @required_clks Flags shown the bitmap for required clocks on
drivers/clk/mediatek/clk-mtk.h | 1 +
1 file changed, 1 insertion(+)
-diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
-index f10250dcece4..bf8006d41861 100644
--- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h
@@ -20,6 +20,7 @@
#define MAX_MUX_GATE_BIT 31
#define INVALID_MUX_GATE_BIT (MAX_MUX_GATE_BIT + 1)
---
-2.11.0
-
drivers/phy/mediatek/phy-mtk-tphy.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
-diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
-index 402385f2562a..54cc44b2d289 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
-@@ -440,9 +440,9 @@ static void u2_phy_instance_init(struct mtk_tphy *tphy,
+@@ -440,9 +440,9 @@ static void u2_phy_instance_init(struct
u32 index = instance->index;
u32 tmp;
tmp |= P2C_RG_XCVRSEL_VAL(1) | P2C_RG_DATAIN_VAL(0);
writel(tmp, com + U3P_U2PHYDTM0);
-@@ -502,10 +502,8 @@ static void u2_phy_instance_power_on(struct mtk_tphy *tphy,
+@@ -502,10 +502,8 @@ static void u2_phy_instance_power_on(str
u32 index = instance->index;
u32 tmp;
writel(tmp, com + U3P_U2PHYDTM0);
/* OTG Enable */
-@@ -540,7 +538,6 @@ static void u2_phy_instance_power_off(struct mtk_tphy *tphy,
+@@ -540,7 +538,6 @@ static void u2_phy_instance_power_off(st
tmp = readl(com + U3P_U2PHYDTM0);
tmp &= ~(P2C_RG_XCVRSEL | P2C_RG_DATAIN);
writel(tmp, com + U3P_U2PHYDTM0);
/* OTG Disable */
-@@ -548,18 +545,16 @@ static void u2_phy_instance_power_off(struct mtk_tphy *tphy,
+@@ -548,18 +545,16 @@ static void u2_phy_instance_power_off(st
tmp &= ~PA6_RG_U2_OTG_VBUSCMP_EN;
writel(tmp, com + U3P_USBPHYACR6);
tmp = readl(com + U3D_U2PHYDCR0);
tmp &= ~P2C_RG_SIF_U2PLL_FORCE_ON;
writel(tmp, com + U3D_U2PHYDCR0);
---
-2.11.0
-
drivers/phy/mediatek/phy-mtk-tphy.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
-diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
-index 54cc44b2d289..11cab1d84a02 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
-@@ -1023,9 +1023,10 @@ static int mtk_tphy_probe(struct platform_device *pdev)
+@@ -1023,9 +1023,10 @@ static int mtk_tphy_probe(struct platfor
tphy->dev = dev;
platform_set_drvdata(pdev, tphy);
tphy->sif_base = devm_ioremap_resource(dev, sif_res);
if (IS_ERR(tphy->sif_base)) {
dev_err(dev, "failed to remap sif regs\n");
---
-2.11.0
-
drivers/phy/mediatek/phy-mtk-tphy.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
-diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
-index 11cab1d84a02..1e96d0740ef5 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -20,6 +20,7 @@
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
-@@ -995,7 +996,6 @@ MODULE_DEVICE_TABLE(of, mtk_tphy_id_table);
+@@ -995,7 +996,6 @@ MODULE_DEVICE_TABLE(of, mtk_tphy_id_tabl
static int mtk_tphy_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
struct device_node *child_np;
-@@ -1005,15 +1005,14 @@ static int mtk_tphy_probe(struct platform_device *pdev)
+@@ -1005,15 +1005,14 @@ static int mtk_tphy_probe(struct platfor
struct resource res;
int port, retval;
tphy->nphys = of_get_child_count(np);
tphy->phys = devm_kcalloc(dev, tphy->nphys,
sizeof(*tphy->phys), GFP_KERNEL);
---
-2.11.0
-
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 31 ++++++++++++++----------------
1 file changed, 14 insertions(+), 17 deletions(-)
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
-index 8fda182f849b..a7362d1cda1b 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
-@@ -1590,12 +1590,16 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1590,12 +1590,16 @@ static int mt2701_afe_pcm_dev_probe(stru
}
platform_set_drvdata(pdev, afe);
if (ret) {
dev_warn(dev, "err_platform\n");
goto err_platform;
-@@ -1610,35 +1614,28 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1610,35 +1614,28 @@ static int mt2701_afe_pcm_dev_probe(stru
goto err_dai_component;
}
return 0;
}
---
-2.11.0
-
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 45 +-
4 files changed, 200 insertions(+), 442 deletions(-)
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
-index affa7fb25dd9..75ccdca5811d 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
@@ -21,442 +21,256 @@
{
struct mt2701_afe_private *afe_priv = afe->platform_priv;
- int i = 0;
--
++ int i;
+
- for (i = 0; i < MT2701_CLOCK_NUM; i++) {
- afe_priv->clocks[i] = devm_clk_get(afe->dev, aud_clks[i]);
- if (IS_ERR(afe_priv->clocks[i])) {
- dev_warn(afe->dev, "%s devm_clk_get %s fail\n",
- __func__, aud_clks[i]);
- return PTR_ERR(aud_clks[i]);
-+ int i;
-+
+ for (i = 0; i < MT2701_BASE_CLK_NUM; i++) {
+ afe_priv->base_ck[i] = devm_clk_get(afe->dev, base_clks[i]);
+ if (IS_ERR(afe_priv->base_ck[i])) {
+ for (i = 0; i < MT2701_I2S_NUM; i++) {
+ struct mt2701_i2s_path *i2s_path = &afe_priv->i2s_path[i];
+ char name[13];
-
--int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
--{
-- int ret = 0;
++
+ snprintf(name, sizeof(name), "i2s%d_src_sel", i);
+ i2s_path->sel_ck = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->sel_ck)) {
+ return PTR_ERR(i2s_path->sel_ck);
+ }
-- ret = mt2701_turn_on_a1sys_clock(afe);
-- if (ret) {
-- dev_err(afe->dev, "%s turn_on_a1sys_clock fail %d\n",
-- __func__, ret);
-- return ret;
-- }
+-int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
+-{
+- int ret = 0;
+ snprintf(name, sizeof(name), "i2s%d_src_div", i);
+ i2s_path->div_ck = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->div_ck)) {
+ return PTR_ERR(i2s_path->div_ck);
+ }
-- ret = mt2701_turn_on_a2sys_clock(afe);
+- ret = mt2701_turn_on_a1sys_clock(afe);
- if (ret) {
-- dev_err(afe->dev, "%s turn_on_a2sys_clock fail %d\n",
+- dev_err(afe->dev, "%s turn_on_a1sys_clock fail %d\n",
- __func__, ret);
-- mt2701_turn_off_a1sys_clock(afe);
- return ret;
- }
+ snprintf(name, sizeof(name), "i2s%d_mclk_en", i);
+ return PTR_ERR(i2s_path->mclk_ck);
+ }
-- ret = mt2701_turn_on_afe_clock(afe);
+- ret = mt2701_turn_on_a2sys_clock(afe);
- if (ret) {
-- dev_err(afe->dev, "%s turn_on_afe_clock fail %d\n",
+- dev_err(afe->dev, "%s turn_on_a2sys_clock fail %d\n",
- __func__, ret);
- mt2701_turn_off_a1sys_clock(afe);
-- mt2701_turn_off_a2sys_clock(afe);
- return ret;
+- }
+ snprintf(name, sizeof(name), "i2so%d_hop_ck", i);
+ i2s_path->hop_ck[I2S_OUT] = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->hop_ck[I2S_OUT])) {
+ dev_err(afe->dev, "failed to get %s\n", name);
+ return PTR_ERR(i2s_path->hop_ck[I2S_OUT]);
+ }
-+
+
+- ret = mt2701_turn_on_afe_clock(afe);
+- if (ret) {
+- dev_err(afe->dev, "%s turn_on_afe_clock fail %d\n",
+- __func__, ret);
+- mt2701_turn_off_a1sys_clock(afe);
+- mt2701_turn_off_a2sys_clock(afe);
+- return ret;
+ snprintf(name, sizeof(name), "i2si%d_hop_ck", i);
+ i2s_path->hop_ck[I2S_IN] = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->hop_ck[I2S_IN])) {
- /* enable INFRA_SYS */
- ret = clk_prepare_enable(afe_priv->clocks[MT2701_AUD_INFRA_SYS_AUDIO]);
-- if (ret) {
++ /* Enable audio system */
++ ret = mt2701_afe_enable_audsys(afe);
+ if (ret) {
- dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
- __func__, aud_clks[MT2701_AUD_INFRA_SYS_AUDIO], ret);
- goto AFE_AUD_INFRA_ERR;
-
- /* Set MT2701_AUD_ASM_M_SEL to MT2701_AUD_UNIVPLL2_D4 */
- ret = clk_prepare_enable(afe_priv->clocks[MT2701_AUD_ASM_M_SEL]);
-+ /* Enable audio system */
-+ ret = mt2701_afe_enable_audsys(afe);
- if (ret) {
+- if (ret) {
- dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
- __func__, aud_clks[MT2701_AUD_ASM_M_SEL], ret);
- goto AFE_AUD_ASM_M_ERR;
+ AFE_DAC_CON0_AFE_ON, 0);
- clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_INFRA_SYS_AUDIO]);
--
++ mt2701_afe_disable_audsys(afe);
+
- clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_AUDINTBUS]);
- clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_ASM_H_SEL]);
- clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_ASM_M_SEL]);
- regmap_update_bits(afe->regmap, AUDIO_TOP_CON4,
- AUDIO_TOP_CON4_PDN_AFE_CONN,
- AUDIO_TOP_CON4_PDN_AFE_CONN);
-+ mt2701_afe_disable_audsys(afe);
-+
+ return 0;
}
}
MODULE_DESCRIPTION("MT2701 afe clock control");
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h
-index 6497d570cf09..15417d9d6597 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h
@@ -21,16 +21,15 @@ struct mtk_base_afe;
void mt2701_mclk_configuration(struct mtk_base_afe *afe, int id, int domain,
int mclk);
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-common.h b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
-index c19430e98adf..ce5bd4dc864d 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-common.h
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
@@ -69,53 +69,14 @@ enum {
bool mrg_enable[MT2701_STREAM_DIR_NUM];
};
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
-index a7362d1cda1b..33f809228f25 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
-@@ -97,21 +97,12 @@ static int mt2701_afe_i2s_startup(struct snd_pcm_substream *substream,
+@@ -97,21 +97,12 @@ static int mt2701_afe_i2s_startup(struct
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform);
}
static int mt2701_afe_i2s_path_shutdown(struct snd_pcm_substream *substream,
-@@ -151,9 +142,9 @@ static int mt2701_afe_i2s_path_shutdown(struct snd_pcm_substream *substream,
+@@ -151,9 +142,9 @@ static int mt2701_afe_i2s_path_shutdown(
/* disable i2s */
regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg,
ASYS_I2S_CON_I2S_EN, 0);
return 0;
}
-@@ -165,7 +156,6 @@ static void mt2701_afe_i2s_shutdown(struct snd_pcm_substream *substream,
+@@ -165,7 +156,6 @@ static void mt2701_afe_i2s_shutdown(stru
struct mt2701_afe_private *afe_priv = afe->platform_priv;
int i2s_num = mt2701_dai_num_to_i2s(afe, dai->id);
struct mt2701_i2s_path *i2s_path;
if (i2s_num < 0)
return;
-@@ -185,7 +175,7 @@ static void mt2701_afe_i2s_shutdown(struct snd_pcm_substream *substream,
+@@ -185,7 +175,7 @@ static void mt2701_afe_i2s_shutdown(stru
I2S_UNSTART:
/* disable mclk */
}
static int mt2701_i2s_path_prepare_enable(struct snd_pcm_substream *substream,
-@@ -251,9 +241,7 @@ static int mt2701_i2s_path_prepare_enable(struct snd_pcm_substream *substream,
+@@ -251,9 +241,7 @@ static int mt2701_i2s_path_prepare_enabl
fs << i2s_data->i2s_asrc_fs_shift);
/* enable i2s */
/* reset i2s hw status before enable */
regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg,
-@@ -339,9 +327,11 @@ static int mt2701_btmrg_startup(struct snd_pcm_substream *substream,
+@@ -339,9 +327,11 @@ static int mt2701_btmrg_startup(struct s
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform);
struct mt2701_afe_private *afe_priv = afe->platform_priv;
afe_priv->mrg_enable[substream->stream] = 1;
return 0;
-@@ -406,9 +396,7 @@ static void mt2701_btmrg_shutdown(struct snd_pcm_substream *substream,
+@@ -406,9 +396,7 @@ static void mt2701_btmrg_shutdown(struct
AFE_MRGIF_CON_MRG_EN, 0);
regmap_update_bits(afe->regmap, AFE_MRGIF_CON,
AFE_MRGIF_CON_MRG_I2S_EN, 0);
}
afe_priv->mrg_enable[substream->stream] = 0;
}
-@@ -1386,14 +1374,12 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = {
+@@ -1386,14 +1374,12 @@ static const struct mt2701_i2s_data mt27
{
{
.i2s_ctrl_reg = ASYS_I2SO1_CON,
.i2s_asrc_fs_shift = 0,
.i2s_asrc_fs_mask = 0x1f,
-@@ -1402,14 +1388,12 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = {
+@@ -1402,14 +1388,12 @@ static const struct mt2701_i2s_data mt27
{
{
.i2s_ctrl_reg = ASYS_I2SO2_CON,
.i2s_asrc_fs_shift = 5,
.i2s_asrc_fs_mask = 0x1f,
-@@ -1418,14 +1402,12 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = {
+@@ -1418,14 +1402,12 @@ static const struct mt2701_i2s_data mt27
{
{
.i2s_ctrl_reg = ASYS_I2SO3_CON,
.i2s_asrc_fs_shift = 10,
.i2s_asrc_fs_mask = 0x1f,
-@@ -1434,14 +1416,12 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = {
+@@ -1434,14 +1416,12 @@ static const struct mt2701_i2s_data mt27
{
{
.i2s_ctrl_reg = ASYS_I2SO4_CON,
.i2s_asrc_fs_shift = 15,
.i2s_asrc_fs_mask = 0x1f,
-@@ -1483,8 +1463,7 @@ static int mt2701_afe_runtime_suspend(struct device *dev)
+@@ -1483,8 +1463,7 @@ static int mt2701_afe_runtime_suspend(st
{
struct mtk_base_afe *afe = dev_get_drvdata(dev);
}
static int mt2701_afe_runtime_resume(struct device *dev)
---
-2.11.0
-
sound/soc/mediatek/mt2701/mt2701-reg.h | 41 +---------
4 files changed, 24 insertions(+), 145 deletions(-)
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
-index 75ccdca5811d..56a057c78c9a 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
@@ -14,10 +14,6 @@
#include "mt2701-afe-common.h"
#include "mt2701-afe-clock-ctrl.h"
-@@ -223,8 +219,8 @@ int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
+@@ -223,8 +219,8 @@ int mt2701_afe_enable_clock(struct mtk_b
}
regmap_update_bits(afe->regmap, ASYS_TOP_CON,
regmap_update_bits(afe->regmap, AFE_DAC_CON0,
AFE_DAC_CON0_AFE_ON,
AFE_DAC_CON0_AFE_ON);
-@@ -239,7 +235,7 @@ int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
+@@ -239,7 +235,7 @@ int mt2701_afe_enable_clock(struct mtk_b
int mt2701_afe_disable_clock(struct mtk_base_afe *afe)
{
regmap_update_bits(afe->regmap, ASYS_TOP_CON,
regmap_update_bits(afe->regmap, AFE_DAC_CON0,
AFE_DAC_CON0_AFE_ON, 0);
-@@ -272,7 +268,3 @@ void mt2701_mclk_configuration(struct mtk_base_afe *afe, int id, int domain,
+@@ -272,7 +268,3 @@ void mt2701_mclk_configuration(struct mt
if (ret)
dev_err(afe->dev, "failed to set mclk divider %d\n", ret);
}
-MODULE_DESCRIPTION("MT2701 afe clock control");
-MODULE_AUTHOR("Garlic Tseng <garlic.tseng@mediatek.com>");
-MODULE_LICENSE("GPL v2");
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-common.h b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
-index ce5bd4dc864d..9a2b301a4c21 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-common.h
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
@@ -16,6 +16,7 @@
MT2701_IRQ_ASYS_IRQ2,
MT2701_IRQ_ASYS_IRQ3,
MT2701_IRQ_ASYS_END,
-@@ -100,9 +91,6 @@ static const unsigned int mt2701_afe_backup_list[] = {
+@@ -100,9 +91,6 @@ static const unsigned int mt2701_afe_bac
AFE_MEMIF_PBUF_SIZE,
};
struct clk *hop_ck[I2S_DIR_NUM];
struct clk *sel_ck;
struct clk *div_ck;
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
-index 33f809228f25..0edadca12a5e 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
@@ -20,16 +20,12 @@
static const struct snd_pcm_hardware mt2701_afe_hardware = {
.info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED
| SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_MMAP_VALID,
-@@ -107,21 +103,16 @@ static int mt2701_afe_i2s_startup(struct snd_pcm_substream *substream,
+@@ -107,21 +103,16 @@ static int mt2701_afe_i2s_startup(struct
static int mt2701_afe_i2s_path_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai,
if (dir_invert) {
if (stream_dir == SNDRV_PCM_STREAM_PLAYBACK)
stream_dir = SNDRV_PCM_STREAM_CAPTURE;
-@@ -167,11 +158,11 @@ static void mt2701_afe_i2s_shutdown(struct snd_pcm_substream *substream,
+@@ -167,11 +158,11 @@ static void mt2701_afe_i2s_shutdown(stru
else
goto I2S_UNSTART;
I2S_UNSTART:
/* disable mclk */
-@@ -180,24 +171,19 @@ static void mt2701_afe_i2s_shutdown(struct snd_pcm_substream *substream,
+@@ -180,24 +171,19 @@ I2S_UNSTART:
static int mt2701_i2s_path_prepare_enable(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai,
if (dir_invert) {
if (stream_dir == SNDRV_PCM_STREAM_PLAYBACK)
stream_dir = SNDRV_PCM_STREAM_CAPTURE;
-@@ -288,13 +274,13 @@ static int mt2701_afe_i2s_prepare(struct snd_pcm_substream *substream,
+@@ -288,13 +274,13 @@ static int mt2701_afe_i2s_prepare(struct
mt2701_mclk_configuration(afe, i2s_num, clk_domain, mclk_rate);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
}
return 0;
-@@ -562,7 +548,6 @@ static const struct snd_soc_dai_ops mt2701_single_memif_dai_ops = {
+@@ -562,7 +548,6 @@ static const struct snd_soc_dai_ops mt27
.hw_free = mtk_afe_fe_hw_free,
.prepare = mtk_afe_fe_prepare,
.trigger = mtk_afe_fe_trigger,
};
static const struct snd_soc_dai_ops mt2701_dlm_memif_dai_ops = {
-@@ -903,31 +888,6 @@ static const struct snd_kcontrol_new mt2701_afe_multi_ch_out_i2s4[] = {
+@@ -903,31 +888,6 @@ static const struct snd_kcontrol_new mt2
PWR2_TOP_CON, 19, 1, 0),
};
static const struct snd_soc_dapm_widget mt2701_afe_pcm_widgets[] = {
/* inter-connections */
SND_SOC_DAPM_MIXER("I00", SND_SOC_NOPM, 0, 0, NULL, 0),
-@@ -987,19 +947,6 @@ static const struct snd_soc_dapm_widget mt2701_afe_pcm_widgets[] = {
+@@ -987,19 +947,6 @@ static const struct snd_soc_dapm_widget
SND_SOC_DAPM_MIXER("I18I19", SND_SOC_NOPM, 0, 0,
mt2701_afe_multi_ch_out_i2s3,
ARRAY_SIZE(mt2701_afe_multi_ch_out_i2s3)),
};
static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = {
-@@ -1009,7 +956,6 @@ static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = {
+@@ -1009,7 +956,6 @@ static const struct snd_soc_dapm_route m
{"I2S0 Playback", NULL, "O15"},
{"I2S0 Playback", NULL, "O16"},
{"I2S1 Playback", NULL, "O17"},
{"I2S1 Playback", NULL, "O18"},
{"I2S2 Playback", NULL, "O19"},
-@@ -1026,7 +972,6 @@ static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = {
+@@ -1026,7 +972,6 @@ static const struct snd_soc_dapm_route m
{"I00", NULL, "I2S0 Capture"},
{"I01", NULL, "I2S0 Capture"},
{"I02", NULL, "I2S1 Capture"},
{"I03", NULL, "I2S1 Capture"},
/* I02,03 link to UL2, also need to open I2S0 */
-@@ -1034,15 +979,10 @@ static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = {
+@@ -1034,15 +979,10 @@ static const struct snd_soc_dapm_route m
{"I26", NULL, "BT Capture"},
{ "I12", NULL, "I12I13" },
{ "I13", NULL, "I12I13" },
-@@ -1067,7 +1007,6 @@ static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = {
+@@ -1067,7 +1007,6 @@ static const struct snd_soc_dapm_route m
{ "O21", "I18 Switch", "I18" },
{ "O22", "I19 Switch", "I19" },
{ "O31", "I35 Switch", "I35" },
};
static const struct snd_soc_component_driver mt2701_afe_pcm_dai_component = {
-@@ -1484,12 +1423,13 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1484,12 +1423,13 @@ static int mt2701_afe_pcm_dev_probe(stru
afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL);
if (!afe)
return -ENOMEM;
afe->dev = &pdev->dev;
dev = afe->dev;
-@@ -1524,7 +1464,6 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1524,7 +1464,6 @@ static int mt2701_afe_pcm_dev_probe(stru
afe->memif_size = MT2701_MEMIF_NUM;
afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif),
GFP_KERNEL);
if (!afe->memif)
return -ENOMEM;
-@@ -1537,7 +1476,6 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1537,7 +1476,6 @@ static int mt2701_afe_pcm_dev_probe(stru
afe->irqs_size = MT2701_IRQ_ASYS_END;
afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs),
GFP_KERNEL);
if (!afe->irqs)
return -ENOMEM;
-@@ -1555,7 +1493,6 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1555,7 +1493,6 @@ static int mt2701_afe_pcm_dev_probe(stru
afe->mtk_afe_hardware = &mt2701_afe_hardware;
afe->memif_fs = mt2701_memif_fs;
afe->irq_fs = mt2701_irq_fs;
afe->reg_back_up_list = mt2701_afe_backup_list;
afe->reg_back_up_list_num = ARRAY_SIZE(mt2701_afe_backup_list);
afe->runtime_resume = mt2701_afe_runtime_resume;
-@@ -1646,4 +1583,3 @@ module_platform_driver(mt2701_afe_pcm_driver);
+@@ -1646,4 +1583,3 @@ module_platform_driver(mt2701_afe_pcm_dr
MODULE_DESCRIPTION("Mediatek ALSA SoC AFE platform driver for 2701");
MODULE_AUTHOR("Garlic Tseng <garlic.tseng@mediatek.com>");
MODULE_LICENSE("GPL v2");
-
-diff --git a/sound/soc/mediatek/mt2701/mt2701-reg.h b/sound/soc/mediatek/mt2701/mt2701-reg.h
-index bb62b1c55957..f17c76f37b5f 100644
--- a/sound/soc/mediatek/mt2701/mt2701-reg.h
+++ b/sound/soc/mediatek/mt2701/mt2701-reg.h
@@ -17,17 +17,6 @@
/* PWR2_ASM_CON1 (0x1070) */
#define PWR2_ASM_CON1_INIT_VAL (0x492492)
---
-2.11.0
-
.../devicetree/bindings/sound/mt2701-afe-pcm.txt | 207 +++++++++------------
1 file changed, 91 insertions(+), 116 deletions(-)
-diff --git a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
-index 77a57f84bed4..0450baad2813 100644
--- a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
+++ b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
@@ -6,51 +6,44 @@ Required properties:
+ <&topckgen CLK_TOP_AUD2PLL_90M>;
+ assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
};
---
-2.11.0
-
sound/soc/mediatek/mt2701/mt2701-afe-common.h | 3 +++
2 files changed, 32 insertions(+), 1 deletion(-)
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
-index 56a057c78c9a..949fc3a1d025 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
@@ -18,8 +18,11 @@
[MT2701_AUDSYS_AFE] = "audio_afe_pd",
[MT2701_AUDSYS_AFE_CONN] = "audio_afe_conn_pd",
[MT2701_AUDSYS_A1SYS] = "audio_a1sys_pd",
-@@ -169,10 +172,26 @@ static int mt2701_afe_enable_audsys(struct mtk_base_afe *afe)
+@@ -169,10 +172,26 @@ static int mt2701_afe_enable_audsys(stru
struct mt2701_afe_private *afe_priv = afe->platform_priv;
int ret;
ret = clk_prepare_enable(afe_priv->base_ck[MT2701_AUDSYS_A1SYS]);
if (ret)
goto err_audio_a1sys;
-@@ -193,6 +212,12 @@ static int mt2701_afe_enable_audsys(struct mtk_base_afe *afe)
+@@ -193,6 +212,12 @@ err_audio_a2sys:
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_A1SYS]);
err_audio_a1sys:
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_AFE]);
return ret;
}
-@@ -205,6 +230,9 @@ static void mt2701_afe_disable_audsys(struct mtk_base_afe *afe)
+@@ -205,6 +230,9 @@ static void mt2701_afe_disable_audsys(st
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_A2SYS]);
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_A1SYS]);
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_AFE]);
}
int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-common.h b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
-index 9a2b301a4c21..ae8ddeacfbfe 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-common.h
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
@@ -61,8 +61,11 @@ enum {
MT2701_AUDSYS_AFE,
MT2701_AUDSYS_AFE_CONN,
MT2701_AUDSYS_A1SYS,
---
-2.11.0
-
sound/soc/mediatek/mt2701/mt2701-reg.h | 1 -
2 files changed, 20 insertions(+), 26 deletions(-)
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
-index 0edadca12a5e..f0cd08fa5c5d 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
@@ -17,6 +17,7 @@
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/pm_runtime.h>
-@@ -1368,14 +1369,6 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = {
+@@ -1368,14 +1369,6 @@ static const struct mt2701_i2s_data mt27
},
};
static irqreturn_t mt2701_asys_isr(int irq_id, void *dev)
{
int id;
-@@ -1414,9 +1407,9 @@ static int mt2701_afe_runtime_resume(struct device *dev)
+@@ -1414,9 +1407,9 @@ static int mt2701_afe_runtime_resume(str
static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
{
struct device *dev;
int i, irq_id, ret;
-@@ -1446,17 +1439,11 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1446,17 +1439,11 @@ static int mt2701_afe_pcm_dev_probe(stru
return ret;
}
mutex_init(&afe->irq_alloc_lock);
-@@ -1490,6 +1477,12 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1490,6 +1477,12 @@ static int mt2701_afe_pcm_dev_probe(stru
= &mt2701_i2s_data[i][I2S_IN];
}
afe->mtk_afe_hardware = &mt2701_afe_hardware;
afe->memif_fs = mt2701_memif_fs;
afe->irq_fs = mt2701_irq_fs;
-@@ -1502,7 +1495,7 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1502,7 +1495,7 @@ static int mt2701_afe_pcm_dev_probe(stru
ret = mt2701_init_clock(afe);
if (ret) {
dev_err(dev, "init clock error\n");
}
platform_set_drvdata(pdev, afe);
-@@ -1521,10 +1514,10 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1521,10 +1514,10 @@ static int mt2701_afe_pcm_dev_probe(stru
goto err_platform;
}
if (ret) {
dev_warn(dev, "err_dai_component\n");
goto err_dai_component;
-@@ -1538,6 +1531,8 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1538,6 +1531,8 @@ err_platform:
pm_runtime_put_sync(dev);
err_pm_disable:
pm_runtime_disable(dev);
return ret;
}
-diff --git a/sound/soc/mediatek/mt2701/mt2701-reg.h b/sound/soc/mediatek/mt2701/mt2701-reg.h
-index f17c76f37b5f..18e676974f22 100644
--- a/sound/soc/mediatek/mt2701/mt2701-reg.h
+++ b/sound/soc/mediatek/mt2701/mt2701-reg.h
@@ -145,5 +145,4 @@
-#define AFE_END_ADDR 0x15e0
#endif
---
-2.11.0
-
.../devicetree/bindings/sound/mt2701-afe-pcm.txt | 171 +++++++++++----------
1 file changed, 93 insertions(+), 78 deletions(-)
-diff --git a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
-index 0450baad2813..6df87b97f7cb 100644
--- a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
+++ b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
@@ -2,15 +2,17 @@ Mediatek AFE PCM controller for mt2701
- <&audiosys CLK_AUD_A1SYS>,
- <&audiosys CLK_AUD_A2SYS>,
- <&audiosys CLK_AUD_AFE_MRGIF>;
+-
+- clock-names = "top_audio_mux1_sel",
+- "top_audio_mux2_sel",
+- "i2s0_src_sel",
+- "i2s1_src_sel",
+- "i2s2_src_sel",
+- "i2s3_src_sel",
+- "i2s0_src_div",
+- "i2s1_src_div",
+- "i2s2_src_div",
+- "i2s3_src_div",
+- "i2s0_mclk_en",
+- "i2s1_mclk_en",
+- "i2s2_mclk_en",
+- "i2s3_mclk_en",
+- "i2so0_hop_ck",
+- "i2so1_hop_ck",
+- "i2so2_hop_ck",
+- "i2so3_hop_ck",
+- "i2si0_hop_ck",
+- "i2si1_hop_ck",
+- "i2si2_hop_ck",
+- "i2si3_hop_ck",
+- "asrc0_out_ck",
+- "asrc1_out_ck",
+- "asrc2_out_ck",
+- "asrc3_out_ck",
+- "audio_afe_pd",
+- "audio_afe_conn_pd",
+- "audio_a1sys_pd",
+- "audio_a2sys_pd",
+- "audio_mrgif_pd";
+-
+- assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>,
+- <&topckgen CLK_TOP_AUD_MUX2_SEL>,
+- <&topckgen CLK_TOP_AUD_MUX1_DIV>,
+- <&topckgen CLK_TOP_AUD_MUX2_DIV>;
+- assigned-clock-parents = <&topckgen CLK_TOP_AUD1PLL_98M>,
+- <&topckgen CLK_TOP_AUD2PLL_90M>;
+- assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
+ audsys: audio-subsystem@11220000 {
+ compatible = "mediatek,mt2701-audsys", "syscon", "simple-mfd";
+ ...
+ <&audsys CLK_AUD_A1SYS>,
+ <&audsys CLK_AUD_A2SYS>,
+ <&audsys CLK_AUD_AFE_MRGIF>;
-
-- clock-names = "top_audio_mux1_sel",
-- "top_audio_mux2_sel",
-- "i2s0_src_sel",
-- "i2s1_src_sel",
-- "i2s2_src_sel",
-- "i2s3_src_sel",
-- "i2s0_src_div",
-- "i2s1_src_div",
-- "i2s2_src_div",
-- "i2s3_src_div",
-- "i2s0_mclk_en",
-- "i2s1_mclk_en",
-- "i2s2_mclk_en",
-- "i2s3_mclk_en",
-- "i2so0_hop_ck",
-- "i2so1_hop_ck",
-- "i2so2_hop_ck",
-- "i2so3_hop_ck",
-- "i2si0_hop_ck",
-- "i2si1_hop_ck",
-- "i2si2_hop_ck",
-- "i2si3_hop_ck",
-- "asrc0_out_ck",
-- "asrc1_out_ck",
-- "asrc2_out_ck",
-- "asrc3_out_ck",
-- "audio_afe_pd",
-- "audio_afe_conn_pd",
-- "audio_a1sys_pd",
-- "audio_a2sys_pd",
-- "audio_mrgif_pd";
++
+ clock-names = "infra_sys_audio_clk",
+ "top_audio_mux1_sel",
+ "top_audio_mux2_sel",
+ "audio_a1sys_pd",
+ "audio_a2sys_pd",
+ "audio_mrgif_pd";
-
-- assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>,
-- <&topckgen CLK_TOP_AUD_MUX2_SEL>,
-- <&topckgen CLK_TOP_AUD_MUX1_DIV>,
-- <&topckgen CLK_TOP_AUD_MUX2_DIV>;
-- assigned-clock-parents = <&topckgen CLK_TOP_AUD1PLL_98M>,
-- <&topckgen CLK_TOP_AUD2PLL_90M>;
-- assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
++
+ assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>,
+ <&topckgen CLK_TOP_AUD_MUX2_SEL>,
+ <&topckgen CLK_TOP_AUD_MUX1_DIV>,
+ assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
+ };
};
---
-2.11.0
-
drivers/usb/mtu3/mtu3_plat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index 9ff33579b42e..a2523ead46cf 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
-@@ -317,7 +317,7 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -317,7 +317,7 @@ static int get_ssusb_rscs(struct platfor
otg_sx->edev = extcon_get_edev_by_phandle(ssusb->dev, 0);
if (IS_ERR(otg_sx->edev)) {
dev_err(ssusb->dev, "couldn't get extcon device\n");
}
}
---
-2.11.0
-
drivers/usb/mtu3/mtu3_plat.c | 8 +--
4 files changed, 70 insertions(+), 67 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index d80e4e813248..ed3aec46eda1 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -238,7 +238,10 @@ struct otg_switch_mtk {
};
/**
-diff --git a/drivers/usb/mtu3/mtu3_dr.h b/drivers/usb/mtu3/mtu3_dr.h
-index 0f0cbac00192..1fa62ce136b6 100644
--- a/drivers/usb/mtu3/mtu3_dr.h
+++ b/drivers/usb/mtu3/mtu3_dr.h
-@@ -27,8 +27,7 @@ int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb,
+@@ -27,8 +27,7 @@ int ssusb_wakeup_of_property_parse(struc
struct device_node *dn);
int ssusb_host_enable(struct ssusb_mtk *ssusb);
int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend);
#else
-diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
-index ec76b86dd887..1a1b6cf432a1 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
@@ -27,66 +27,77 @@
{
- u32 tmp;
- struct regmap *pericfg = ssusb->pericfg;
--
++ u32 reg, msk, val;
+
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_IS_P;
- tmp &= ~(UWK_CTL1_IS_C(0xf));
- regmap_read(ssusb->pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_IS_E;
- regmap_write(ssusb->pericfg, PERI_WK_CTRL1, tmp);
-+ u32 reg, msk, val;
-+
+ switch (ssusb->uwk_vers) {
+ case SSUSB_UWK_V1:
+ reg = ssusb->uwk_reg_base + PERI_WK_CTRL1;
}
static void host_ports_num_get(struct ssusb_mtk *ssusb)
-@@ -244,17 +255,3 @@ void ssusb_host_exit(struct ssusb_mtk *ssusb)
+@@ -244,17 +255,3 @@ void ssusb_host_exit(struct ssusb_mtk *s
of_platform_depopulate(ssusb->dev);
ssusb_host_cleanup(ssusb);
}
- if (ssusb->wakeup_en)
- ssusb_wakeup_ip_sleep_dis(ssusb);
-}
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index a2523ead46cf..4cafd4ca8457 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
-@@ -291,8 +291,10 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -291,8 +291,10 @@ static int get_ssusb_rscs(struct platfor
/* if host role is supported */
ret = ssusb_wakeup_of_property_parse(ssusb, node);
/* optional property, ignore the error if it does not exist */
of_property_read_u32(node, "mediatek,u3p-dis-msk",
-@@ -466,7 +468,7 @@ static int __maybe_unused mtu3_suspend(struct device *dev)
+@@ -466,7 +468,7 @@ static int __maybe_unused mtu3_suspend(s
ssusb_host_disable(ssusb, true);
ssusb_phy_power_off(ssusb);
ssusb_clks_disable(ssusb);
return 0;
}
-@@ -482,7 +484,7 @@ static int __maybe_unused mtu3_resume(struct device *dev)
+@@ -482,7 +484,7 @@ static int __maybe_unused mtu3_resume(st
if (!ssusb->is_host)
return 0;
ret = ssusb_clks_enable(ssusb);
if (ret)
goto clks_err;
---
-2.11.0
-
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
-index b2271d8e6b50..d589a1ef96a1 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
@@ -42,9 +42,14 @@ Optional properties:
#address-cells = <2>;
#size-cells = <2>;
ranges;
---
-2.11.0
-
drivers/usb/host/xhci-mtk.h | 6 +-
2 files changed, 65 insertions(+), 118 deletions(-)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index e5caabe7eebe..8e51b3fec386 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -66,26 +66,21 @@
};
static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
-@@ -308,112 +303,58 @@ static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk)
+@@ -308,112 +303,58 @@ static void xhci_mtk_clks_disable(struct
}
/* only clocks can be turn off for ip-sleep wakeup mode */
{
- u32 tmp;
- struct regmap *pericfg = mtk->pericfg;
--
++ u32 reg, msk, val;
+
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_IS_P;
- tmp &= ~(UWK_CTL1_IS_C(0xf));
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- dev_dbg(mtk->dev, "%s(): WK_CTRL1[P6,E25,C26:29]=%#x\n",
- __func__, tmp);
-+ u32 reg, msk, val;
-+
+-}
+-
+-static void usb_wakeup_ip_sleep_dis(struct xhci_hcd_mtk *mtk)
+-{
+- u32 tmp;
+-
+- regmap_read(mtk->pericfg, PERI_WK_CTRL1, &tmp);
+- tmp &= ~UWK_CTL1_IS_E;
+- regmap_write(mtk->pericfg, PERI_WK_CTRL1, tmp);
+ switch (mtk->uwk_vers) {
+ case SSUSB_UWK_V1:
+ reg = mtk->uwk_reg_base + PERI_WK_CTRL1;
+ regmap_update_bits(mtk->uwk, reg, msk, val);
}
--static void usb_wakeup_ip_sleep_dis(struct xhci_hcd_mtk *mtk)
-+static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
-+ struct device_node *dn)
- {
-- u32 tmp;
-+ struct of_phandle_args args;
-+ int ret;
-
-- regmap_read(mtk->pericfg, PERI_WK_CTRL1, &tmp);
-- tmp &= ~UWK_CTL1_IS_E;
-- regmap_write(mtk->pericfg, PERI_WK_CTRL1, tmp);
--}
-+ /* Wakeup function is optional */
-+ mtk->uwk_en = of_property_read_bool(dn, "wakeup-source");
-+ if (!mtk->uwk_en)
-+ return 0;
-
-/*
-* for line-state wakeup mode, phy's power should not power-down
-* and only support cable plug in/out
-*/
-static void usb_wakeup_line_state_en(struct xhci_hcd_mtk *mtk)
--{
++static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
++ struct device_node *dn)
+ {
- u32 tmp;
- struct regmap *pericfg = mtk->pericfg;
-
- regmap_write(pericfg, PERI_WK_CTRL1, tmp);
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- regmap_write(pericfg, PERI_WK_CTRL1, tmp | UWK_CTL1_0P_LS_E);
--
++ struct of_phandle_args args;
++ int ret;
+
- /* line-state of u2-port1 */
- regmap_read(pericfg, PERI_WK_CTRL0, &tmp);
- tmp &= ~(UWK_CTL1_1P_LS_C(0xf));
- regmap_write(pericfg, PERI_WK_CTRL0, tmp);
- regmap_write(pericfg, PERI_WK_CTRL0, tmp | UWK_CTL1_1P_LS_E);
-}
-+ ret = of_parse_phandle_with_fixed_args(dn,
-+ "mediatek,syscon-wakeup", 2, 0, &args);
-+ if (ret)
-+ return ret;
++ /* Wakeup function is optional */
++ mtk->uwk_en = of_property_read_bool(dn, "wakeup-source");
++ if (!mtk->uwk_en)
++ return 0;
-static void usb_wakeup_line_state_dis(struct xhci_hcd_mtk *mtk)
-{
- u32 tmp;
- struct regmap *pericfg = mtk->pericfg;
--
++ ret = of_parse_phandle_with_fixed_args(dn,
++ "mediatek,syscon-wakeup", 2, 0, &args);
++ if (ret)
++ return ret;
+
- /* line-state of u2-port0 */
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_0P_LS_E;
- regmap_write(pericfg, PERI_WK_CTRL1, tmp);
--
-- /* line-state of u2-port1 */
-- regmap_read(pericfg, PERI_WK_CTRL0, &tmp);
-- tmp &= ~UWK_CTL1_1P_LS_E;
-- regmap_write(pericfg, PERI_WK_CTRL0, tmp);
--}
+ mtk->uwk_reg_base = args.args[0];
+ mtk->uwk_vers = args.args[1];
+ mtk->uwk = syscon_node_to_regmap(args.np);
+ dev_info(mtk->dev, "uwk - reg:0x%x, version:%d\n",
+ mtk->uwk_reg_base, mtk->uwk_vers);
+- /* line-state of u2-port1 */
+- regmap_read(pericfg, PERI_WK_CTRL0, &tmp);
+- tmp &= ~UWK_CTL1_1P_LS_E;
+- regmap_write(pericfg, PERI_WK_CTRL0, tmp);
+-}
++ return PTR_ERR_OR_ZERO(mtk->uwk);
+
-static void usb_wakeup_enable(struct xhci_hcd_mtk *mtk)
-{
- if (mtk->wakeup_src == SSUSB_WK_IP_SLEEP)
- usb_wakeup_ip_sleep_en(mtk);
- else if (mtk->wakeup_src == SSUSB_WK_LINE_STATE)
- usb_wakeup_line_state_en(mtk);
--}
-+ return PTR_ERR_OR_ZERO(mtk->uwk);
+ }
-static void usb_wakeup_disable(struct xhci_hcd_mtk *mtk)
--{
++static void usb_wakeup_set(struct xhci_hcd_mtk *mtk, bool enable)
+ {
- if (mtk->wakeup_src == SSUSB_WK_IP_SLEEP)
- usb_wakeup_ip_sleep_dis(mtk);
- else if (mtk->wakeup_src == SSUSB_WK_LINE_STATE)
- usb_wakeup_line_state_dis(mtk);
- }
-
+-}
+-
-static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
- struct device_node *dn)
-+static void usb_wakeup_set(struct xhci_hcd_mtk *mtk, bool enable)
- {
+-{
- struct device *dev = mtk->dev;
-
- /*
}
static int xhci_mtk_setup(struct usb_hcd *hcd);
-@@ -595,8 +536,10 @@ static int xhci_mtk_probe(struct platform_device *pdev)
+@@ -595,8 +536,10 @@ static int xhci_mtk_probe(struct platfor
&mtk->u3p_dis_msk);
ret = usb_wakeup_of_property_parse(mtk, node);
mtk->num_phys = of_count_phandle_with_args(node,
"phys", "#phy-cells");
-@@ -780,7 +723,7 @@ static int __maybe_unused xhci_mtk_suspend(struct device *dev)
+@@ -780,7 +723,7 @@ static int __maybe_unused xhci_mtk_suspe
xhci_mtk_host_disable(mtk);
xhci_mtk_phy_power_off(mtk);
xhci_mtk_clks_disable(mtk);
return 0;
}
-@@ -790,7 +733,7 @@ static int __maybe_unused xhci_mtk_resume(struct device *dev)
+@@ -790,7 +733,7 @@ static int __maybe_unused xhci_mtk_resum
struct usb_hcd *hcd = mtk->hcd;
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
xhci_mtk_clks_enable(mtk);
xhci_mtk_phy_power_on(mtk);
xhci_mtk_host_enable(mtk);
-diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
-index 45ff5c67efb5..85c007ee1f52 100644
--- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h
@@ -131,8 +131,12 @@ struct xhci_hcd_mtk {
};
static inline struct xhci_hcd_mtk *hcd_to_mtk(struct usb_hcd *hcd)
---
-2.11.0
-
drivers/usb/host/xhci.h | 2 ++
7 files changed, 23 insertions(+), 5 deletions(-)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
-index 30595964876a..9ff560298498 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -46,6 +46,7 @@ Optional properties:
};
2nd: dual-role mode with xHCI driver
-diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt
-index 2d80b60eeabe..2390ae58636b 100644
--- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
-@@ -28,6 +28,7 @@ Optional properties:
+@@ -29,6 +29,7 @@ Optional properties:
- clocks: reference to a clock
- usb3-lpm-capable: determines if platform is USB3 LPM capable
- quirk-broken-port-ped: set if the controller has broken port disable mechanism
Example:
usb@f0931000 {
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index 8e51b3fec386..8e4495be6592 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
-@@ -629,6 +629,15 @@ static int xhci_mtk_probe(struct platform_device *pdev)
+@@ -629,6 +629,15 @@ static int xhci_mtk_probe(struct platfor
xhci = hcd_to_xhci(hcd);
xhci->main_hcd = hcd;
xhci->shared_hcd = usb_create_shared_hcd(driver, dev,
dev_name(dev), hcd);
if (!xhci->shared_hcd) {
-diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
-index 8071c8fdd15e..cdd7d7bdfc0f 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
-@@ -258,6 +258,9 @@ static int xhci_pci_setup(struct usb_hcd *hcd)
+@@ -266,6 +266,9 @@ static int xhci_pci_setup(struct usb_hcd
if (!xhci->sbrn)
pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &xhci->sbrn);
retval = xhci_gen_setup(hcd, xhci_pci_quirks);
if (retval)
return retval;
-diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
-index 163bafde709f..47230453a876 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
-@@ -265,6 +265,11 @@ static int xhci_plat_probe(struct platform_device *pdev)
+@@ -269,6 +269,11 @@ static int xhci_plat_probe(struct platfo
if (device_property_read_bool(&pdev->dev, "quirk-broken-port-ped"))
xhci->quirks |= XHCI_BROKEN_PORT_PED;
hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0);
if (IS_ERR(hcd->usb_phy)) {
ret = PTR_ERR(hcd->usb_phy);
-diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
-index b2ff1ff1a02f..ac1b26a81e77 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -597,11 +597,7 @@ int xhci_run(struct usb_hcd *hcd)
writel(temp, &xhci->ir_set->irq_control);
/* Set the HCD state before we enable the irqs */
-diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
-index 2abaa4d6d39d..614380af0f96 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
-@@ -1723,6 +1723,8 @@ struct xhci_hcd {
+@@ -1726,6 +1726,8 @@ struct xhci_hcd {
u8 max_interrupters;
u8 max_ports;
u8 isoc_threshold;
int event_ring_max;
/* 4KB min, 128MB max */
int page_size;
---
-2.11.0
-
.../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
-index 9ff560298498..88d9f4a4b280 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -35,10 +35,14 @@ Required properties:
imod-interval-ns = <10000>;
};
---
-2.11.0
-
drivers/clk/mediatek/clk-mtk.h | 7 -------
3 files changed, 3 insertions(+), 9 deletions(-)
-Index: linux-4.14.25/drivers/clk/mediatek/Kconfig
-===================================================================
---- linux-4.14.25.orig/drivers/clk/mediatek/Kconfig
-+++ linux-4.14.25/drivers/clk/mediatek/Kconfig
+--- a/drivers/clk/mediatek/Kconfig
++++ b/drivers/clk/mediatek/Kconfig
@@ -6,6 +6,7 @@ menu "Clock driver for MediaTek SoC"
config COMMON_CLK_MEDIATEK
---help---
MediaTek SoCs' clock support.
-Index: linux-4.14.25/drivers/clk/mediatek/Makefile
-===================================================================
---- linux-4.14.25.orig/drivers/clk/mediatek/Makefile
-+++ linux-4.14.25/drivers/clk/mediatek/Makefile
+--- a/drivers/clk/mediatek/Makefile
++++ b/drivers/clk/mediatek/Makefile
@@ -1,6 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_COMMON_CLK_MEDIATEK) += clk-mtk.o clk-pll.o clk-gate.o clk-apmixed.o clk-cpumux.o
obj-$(CONFIG_COMMON_CLK_MT6797) += clk-mt6797.o
obj-$(CONFIG_COMMON_CLK_MT6797_IMGSYS) += clk-mt6797-img.o
obj-$(CONFIG_COMMON_CLK_MT6797_MMSYS) += clk-mt6797-mm.o
-Index: linux-4.14.25/drivers/clk/mediatek/clk-mtk.h
-===================================================================
---- linux-4.14.25.orig/drivers/clk/mediatek/clk-mtk.h
-+++ linux-4.14.25/drivers/clk/mediatek/clk-mtk.h
+--- a/drivers/clk/mediatek/clk-mtk.h
++++ b/drivers/clk/mediatek/clk-mtk.h
@@ -229,14 +229,7 @@ void mtk_clk_register_plls(struct device
struct clk *mtk_clk_register_ref2usb_tx(const char *name,
const char *parent_name, void __iomem *reg);
drivers/pinctrl/mediatek/pinctrl-mt7622.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
-diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
-index 3824d82888ac..dc32e3c3bd73 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
@@ -1412,9 +1412,11 @@ static struct pinctrl_desc mtk_desc = {
return !!value;
}
---
-2.11.0
-
drivers/pinctrl/mediatek/pinctrl-mt7622.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
-index dc32e3c3bd73..06e8406c4440 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
-@@ -1160,7 +1160,7 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev,
+@@ -1160,7 +1160,7 @@ static int mtk_pinconf_get(struct pinctr
case PIN_CONFIG_OUTPUT_ENABLE:
err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_DIR, &val);
if (err)
/* HW takes input mode as zero; output mode as non-zero */
if ((val && param == PIN_CONFIG_INPUT_ENABLE) ||
-@@ -1184,11 +1184,11 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev,
+@@ -1184,11 +1184,11 @@ static int mtk_pinconf_get(struct pinctr
case PIN_CONFIG_DRIVE_STRENGTH:
err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_E4, &val);
if (err)
/* 4mA when (e8, e4) = (0, 0); 8mA when (e8, e4) = (0, 1)
* 12mA when (e8, e4) = (1, 0); 16mA when (e8, e4) = (1, 1)
-@@ -1203,7 +1203,7 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev,
+@@ -1203,7 +1203,7 @@ static int mtk_pinconf_get(struct pinctr
err = mtk_hw_get_value(hw, pin, reg, &val);
if (err)
ret = val;
---
-2.11.0
-
drivers/mtd/spi-nor/mtk-quadspi.c | 240 +++++++++++++++++++-------------------
1 file changed, 120 insertions(+), 120 deletions(-)
-diff --git a/drivers/mtd/spi-nor/mtk-quadspi.c b/drivers/mtd/spi-nor/mtk-quadspi.c
-index abe455ccd68b..5442993b71ff 100644
--- a/drivers/mtd/spi-nor/mtk-quadspi.c
+++ b/drivers/mtd/spi-nor/mtk-quadspi.c
@@ -110,7 +110,7 @@
{
int len = 1 + txlen + rxlen;
int i, ret, idx;
-@@ -167,26 +167,26 @@ static int mt8173_nor_do_tx_rx(struct mt8173_nor *mt8173_nor, u8 op,
+@@ -167,26 +167,26 @@ static int mt8173_nor_do_tx_rx(struct mt
if (len > MTK_NOR_MAX_SHIFT)
return -EINVAL;
if (ret)
return ret;
-@@ -195,20 +195,20 @@ static int mt8173_nor_do_tx_rx(struct mt8173_nor *mt8173_nor, u8 op,
+@@ -195,20 +195,20 @@ static int mt8173_nor_do_tx_rx(struct mt
/* read out RX data */
for (i = 0; i < rxlen; i++, idx--)
{
u8 reg;
-@@ -216,27 +216,27 @@ static int mt8173_nor_write_buffer_enable(struct mt8173_nor *mt8173_nor)
+@@ -216,27 +216,27 @@ static int mt8173_nor_write_buffer_enabl
* 0: pre-fetch buffer use for read
* 1: pre-fetch buffer use for page program
*/
switch (nor->addr_width) {
case 3:
-@@ -246,115 +246,115 @@ static void mt8173_nor_set_addr_width(struct mt8173_nor *mt8173_nor)
+@@ -246,115 +246,115 @@ static void mt8173_nor_set_addr_width(st
val |= MTK_NOR_4B_ADDR_EN;
break;
default:
return ret;
}
}
-@@ -362,72 +362,72 @@ static ssize_t mt8173_nor_write(struct spi_nor *nor, loff_t to, size_t len,
+@@ -362,72 +362,72 @@ static ssize_t mt8173_nor_write(struct s
return len;
}
struct device_node *flash_node)
{
const struct spi_nor_hwcaps hwcaps = {
-@@ -439,18 +439,18 @@ static int mtk_nor_init(struct mt8173_nor *mt8173_nor,
+@@ -439,18 +439,18 @@ static int mtk_nor_init(struct mt8173_no
struct spi_nor *nor;
/* initialize controller to accept commands */
nor->mtd.name = "mtk_nor";
/* initialized with NULL */
ret = spi_nor_scan(nor, NULL, &hwcaps);
-@@ -465,34 +465,34 @@ static int mtk_nor_drv_probe(struct platform_device *pdev)
+@@ -465,34 +465,34 @@ static int mtk_nor_drv_probe(struct plat
struct device_node *flash_np;
struct resource *res;
int ret;
if (ret)
return ret;
-@@ -503,20 +503,20 @@ static int mtk_nor_drv_probe(struct platform_device *pdev)
+@@ -503,20 +503,20 @@ static int mtk_nor_drv_probe(struct plat
ret = -ENODEV;
goto nor_free;
}
return 0;
}
-@@ -524,18 +524,18 @@ static int mtk_nor_drv_remove(struct platform_device *pdev)
+@@ -524,18 +524,18 @@ static int mtk_nor_drv_remove(struct pla
#ifdef CONFIG_PM_SLEEP
static int mtk_nor_suspend(struct device *dev)
{
}
static const struct dev_pm_ops mtk_nor_dev_pm_ops = {
---
-2.11.0
-
drivers/char/hw_random/mtk-rng.c | 1 +
1 file changed, 1 insertion(+)
-diff --git a/drivers/char/hw_random/mtk-rng.c b/drivers/char/hw_random/mtk-rng.c
-index 8da7bcf54105..7f99cd52b40e 100644
--- a/drivers/char/hw_random/mtk-rng.c
+++ b/drivers/char/hw_random/mtk-rng.c
-@@ -135,6 +135,7 @@ static int mtk_rng_probe(struct platform_device *pdev)
+@@ -135,6 +135,7 @@ static int mtk_rng_probe(struct platform
#endif
priv->rng.read = mtk_rng_read;
priv->rng.priv = (unsigned long)&pdev->dev;
priv->clk = devm_clk_get(&pdev->dev, "rng");
if (IS_ERR(priv->clk)) {
---
-2.11.0
-
Documentation/devicetree/bindings/thermal/mediatek-thermal.txt | 1 +
1 file changed, 1 insertion(+)
-diff --git a/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt b/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt
-index 0d73ea5e9c0c..41d6a443ad66 100644
--- a/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt
@@ -12,6 +12,7 @@ Required properties:
- reg: Address range of the thermal controller
- interrupts: IRQ for the thermal controller
- clocks, clock-names: Clocks needed for the thermal controller. required
---
-2.11.0
-
drivers/thermal/mtk_thermal.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
-diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c
-index 1e61c09153c9..c75661a3801a 100644
--- a/drivers/thermal/mtk_thermal.c
+++ b/drivers/thermal/mtk_thermal.c
@@ -32,15 +32,10 @@
struct mtk_thermal;
struct thermal_bank_cfg {
-@@ -765,7 +758,7 @@ static struct platform_driver mtk_thermal_driver = {
+@@ -765,7 +758,7 @@ static struct platform_driver mtk_therma
.probe = mtk_thermal_probe,
.remove = mtk_thermal_remove,
.driver = {
.of_match_table = mtk_thermal_of_match,
},
};
---
-2.11.0
-
drivers/thermal/mtk_thermal.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
-diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c
-index c75661a3801a..e709acb2235e 100644
--- a/drivers/thermal/mtk_thermal.c
+++ b/drivers/thermal/mtk_thermal.c
@@ -153,6 +153,12 @@
struct mtk_thermal;
struct thermal_bank_cfg {
-@@ -242,6 +248,12 @@ static const int mt2712_adcpnp[MT2712_NUM_SENSORS_PER_ZONE] = {
+@@ -242,6 +248,12 @@ static const int mt2712_adcpnp[MT2712_NU
static const int mt2712_mux_values[MT2712_NUM_SENSORS] = { 0, 1, 2, 3 };
/**
* The MT8173 thermal controller has four banks. Each bank can read up to
* four temperature sensors simultaneously. The MT8173 has a total of 5
-@@ -329,6 +341,25 @@ static const struct mtk_thermal_data mt2712_thermal_data = {
+@@ -329,6 +341,25 @@ static const struct mtk_thermal_data mt2
.sensor_mux_values = mt2712_mux_values,
};
/**
* raw_to_mcelsius - convert a raw ADC value to mcelsius
* @mt: The thermal controller
-@@ -631,6 +662,10 @@ static const struct of_device_id mtk_thermal_of_match[] = {
+@@ -631,6 +662,10 @@ static const struct of_device_id mtk_the
{
.compatible = "mediatek,mt2712-thermal",
.data = (void *)&mt2712_thermal_data,
}, {
},
};
---
-2.11.0
-
Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt | 2 ++
3 files changed, 5 insertions(+)
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
-index 7aa3fa167668..52757adf86bb 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
@@ -9,6 +9,7 @@ Required Properties:
The ethsys controller uses the common clk binding from
Documentation/devicetree/bindings/clock/clock-bindings.txt
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
-index d5d5f1227665..7fe5dc6097a6 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
@@ -8,6 +8,7 @@ Required Properties:
#clock-cells = <1>;
+ #reset-cells = <1>;
};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
-index 00760019da00..b8184da2508c 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
@@ -8,6 +8,7 @@ Required Properties:
#clock-cells = <1>;
+ #reset-cells = <1>;
};
---
-2.11.0
-
Documentation/devicetree/bindings/mmc/mtk-sd.txt | 1 +
1 file changed, 1 insertion(+)
-diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
-index 9b8017670870..f33467a54a05 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -12,6 +12,7 @@ Required properties:
"mediatek,mt7623-mmc", "mediatek,mt2701-mmc": for MT7623 SoC
- reg: physical base address of the controller and length
---
-2.11.0
-
drivers/mmc/host/mtk-sd.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index 27a62254f12f..f5e0662f2590 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
-@@ -438,11 +438,23 @@ static const struct mtk_mmc_compatible mt2712_compat = {
+@@ -438,11 +438,23 @@ static const struct mtk_mmc_compatible m
.enhance_rx = true,
};
{}
};
MODULE_DEVICE_TABLE(of, msdc_of_ids);
---
-2.11.0
-
1 file changed, 33 insertions(+)
create mode 100644 Documentation/devicetree/bindings/dma/mtk-hsdma.txt
-diff --git a/Documentation/devicetree/bindings/dma/mtk-hsdma.txt b/Documentation/devicetree/bindings/dma/mtk-hsdma.txt
-new file mode 100644
-index 000000000000..4bb317359dc6
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/mtk-hsdma.txt
@@ -0,0 +1,33 @@
+ };
+
+DMA clients must use the format described in dma/dma.txt file.
---
-2.11.0
-
create mode 100644 drivers/dma/mediatek/Makefile
create mode 100644 drivers/dma/mediatek/mtk-hsdma.c
-diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
-index fadc4d8783bd..3100b6dfa6e8 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -604,6 +604,8 @@ config ZX_DMA
source "drivers/dma/qcom/Kconfig"
source "drivers/dma/dw/Kconfig"
-diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
-index f08f8de1b567..26b0ef43a8f9 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
-@@ -71,5 +71,6 @@ obj-$(CONFIG_XGENE_DMA) += xgene-dma.o
+@@ -72,5 +72,6 @@ obj-$(CONFIG_XGENE_DMA) += xgene-dma.o
obj-$(CONFIG_ZX_DMA) += zx_dma.o
obj-$(CONFIG_ST_FDMA) += st_fdma.o
+obj-y += mediatek/
obj-y += qcom/
obj-y += xilinx/
-diff --git a/drivers/dma/mediatek/Kconfig b/drivers/dma/mediatek/Kconfig
-new file mode 100644
-index 000000000000..27bac0bba09e
--- /dev/null
+++ b/drivers/dma/mediatek/Kconfig
@@ -0,0 +1,13 @@
+ This controller provides the channels which is dedicated to
+ memory-to-memory transfer to offload from CPU through ring-
+ based descriptor management.
-diff --git a/drivers/dma/mediatek/Makefile b/drivers/dma/mediatek/Makefile
-new file mode 100644
-index 000000000000..6e778f842f01
--- /dev/null
+++ b/drivers/dma/mediatek/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_MTK_HSDMA) += mtk-hsdma.o
-diff --git a/drivers/dma/mediatek/mtk-hsdma.c b/drivers/dma/mediatek/mtk-hsdma.c
-new file mode 100644
-index 000000000000..b7ec56ae02a6
--- /dev/null
+++ b/drivers/dma/mediatek/mtk-hsdma.c
@@ -0,0 +1,1056 @@
+MODULE_DESCRIPTION("MediaTek High-Speed DMA Controller Driver");
+MODULE_AUTHOR("Sean Wang <sean.wang@mediatek.com>");
+MODULE_LICENSE("GPL v2");
---
-2.11.0
-
.../bindings/arm/mediatek/mediatek,audsys.txt | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
-index 9b8f578d5e19..97b304eaa47c 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
-@@ -13,10 +13,19 @@ The AUDSYS controller uses the common clk binding from
+@@ -13,10 +13,19 @@ The AUDSYS controller uses the common cl
Documentation/devicetree/bindings/clock/clock-bindings.txt
The available clocks are defined in dt-bindings/clock/mt*-clk.h.
+ ...
+ };
+ };
---
-2.11.0
-
Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt | 1 +
1 file changed, 1 insertion(+)
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
-index 97b304eaa47c..34a69ba67f13 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
-@@ -6,6 +6,7 @@ The MediaTek AUDSYS controller provides various clocks to the system.
+@@ -6,6 +6,7 @@ The MediaTek AUDSYS controller provides
Required Properties:
- compatible: Should be one of:
- "mediatek,mt7622-audsys", "syscon"
- #clock-cells: Must be 1
---
-2.11.0
-
include/dt-bindings/clock/mt7622-clk.h | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
-diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
-index fad7d9fc53ba..13f752de7adc 100644
--- a/drivers/clk/mediatek/clk-mt7622-aud.c
+++ b/drivers/clk/mediatek/clk-mt7622-aud.c
-@@ -106,6 +106,7 @@ static const struct mtk_gate audio_clks[] = {
+@@ -106,6 +106,7 @@ static const struct mtk_gate audio_clks[
GATE_AUDIO1(CLK_AUDIO_INTDIR, "audio_intdir", "intdir_sel", 20),
GATE_AUDIO1(CLK_AUDIO_A1SYS, "audio_a1sys", "a1sys_hp_sel", 21),
GATE_AUDIO1(CLK_AUDIO_A2SYS, "audio_a2sys", "a2sys_hp_sel", 22),
/* AUDIO2 */
GATE_AUDIO2(CLK_AUDIO_UL1, "audio_ul1", "a1sys_hp_sel", 0),
GATE_AUDIO2(CLK_AUDIO_UL2, "audio_ul2", "a1sys_hp_sel", 1),
-diff --git a/include/dt-bindings/clock/mt7622-clk.h b/include/dt-bindings/clock/mt7622-clk.h
-index 3e514ed51d15..e9d77f0e8bce 100644
--- a/include/dt-bindings/clock/mt7622-clk.h
+++ b/include/dt-bindings/clock/mt7622-clk.h
@@ -235,7 +235,8 @@
/* SSUSBSYS */
---
-2.11.0
-
drivers/clk/mediatek/clk-mt7622-aud.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
-diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
-index 13f752de7adc..0a1109ff65b9 100644
--- a/drivers/clk/mediatek/clk-mt7622-aud.c
+++ b/drivers/clk/mediatek/clk-mt7622-aud.c
-@@ -142,6 +142,7 @@ static int clk_mt7622_audiosys_init(struct platform_device *pdev)
+@@ -142,6 +142,7 @@ static int clk_mt7622_audiosys_init(stru
{
struct clk_onecell_data *clk_data;
struct device_node *node = pdev->dev.of_node;
int r;
clk_data = mtk_alloc_clk_data(CLK_AUDIO_NR_CLK);
-@@ -150,12 +151,15 @@ static int clk_mt7622_audiosys_init(struct platform_device *pdev)
+@@ -150,12 +151,15 @@ static int clk_mt7622_audiosys_init(stru
clk_data);
r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
}
static const struct of_device_id of_match_clk_mt7622_aud[] = {
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 76 ++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index b111fec2ed9d..73e5d628a8c8 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -8,6 +8,8 @@
+ #clock-cells = <1>;
+ };
};
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 73e5d628a8c8..81207e652d59 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -9,6 +9,7 @@
sysirq: interrupt-controller@10200620 {
compatible = "mediatek,mt7622-sysirq",
"mediatek,mt6577-sysirq";
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 7 +
2 files changed, 207 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index c08309df2cc7..fc8ef78a0a34 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -7,6 +7,8 @@
&uart0 {
status = "okay";
};
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 81207e652d59..8211bf72ccaa 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -147,6 +147,13 @@
gic: interrupt-controller@10300000 {
compatible = "arm,gic-400";
interrupt-controller;
---
-2.11.0
-
3 files changed, 106 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt6380.dtsi
-diff --git a/arch/arm64/boot/dts/mediatek/mt6380.dtsi b/arch/arm64/boot/dts/mediatek/mt6380.dtsi
-new file mode 100644
-index 000000000000..53b335d2de5f
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6380.dtsi
@@ -0,0 +1,86 @@
+ };
+ };
+};
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index fc8ef78a0a34..42bd3a4c9a93 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -10,6 +10,7 @@
&uart0 {
status = "okay";
};
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 8211bf72ccaa..c387c4cb7d3e 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -102,6 +102,18 @@
pericfg: pericfg@10002000 {
compatible = "mediatek,mt7622-pericfg",
"syscon";
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 52 ++++++++++++++++++++++++++++
2 files changed, 64 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index 42bd3a4c9a93..b3878656475c 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -20,6 +20,18 @@
gpio-keys {
compatible = "gpio-keys-polled";
poll-interval = <100>;
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index c387c4cb7d3e..7256879de4c9 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -18,6 +18,50 @@
enable-method = "psci";
clock-frequency = <1300000000>;
};
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 7256879de4c9..d8a17d10e2ff 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -91,18 +91,6 @@
clock-names = "baud", "bus";
status = "disabled";
};
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 264 +++++++++++++++++++++++++++
2 files changed, 318 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index b3878656475c..ba6a79caca21 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -235,6 +235,34 @@
+ pinctrl-0 = <&watchdog_pins>;
status = "okay";
};
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index d8a17d10e2ff..448cd366995b 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -11,6 +11,7 @@
uart0: serial@11002000 {
compatible = "mediatek,mt7622-uart",
"mediatek,mt6577-uart";
-@@ -228,6 +335,163 @@
+@@ -227,6 +334,163 @@
+ clock-names = "baud", "bus";
status = "disabled";
};
-
++
+ uart1: serial@11003000 {
+ compatible = "mediatek,mt7622-uart",
+ "mediatek,mt6577-uart";
+ clock-names = "baud", "bus";
+ status = "disabled";
+ };
-+
+
ssusbsys: ssusbsys@1a000000 {
compatible = "mediatek,mt7622-ssusbsys",
- "syscon";
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 34 ++++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index ba6a79caca21..48c5ba472721 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -235,6 +235,10 @@
&pwm {
pinctrl-names = "default";
pinctrl-0 = <&pwm7_pins>;
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 448cd366995b..d287d75e1a54 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -468,6 +468,40 @@
spi1: spi@11016000 {
compatible = "mediatek,mt7622-spi";
reg = <0 0x11016000 0 0x100>;
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 31 ++++++++++++++++++++++++++++
2 files changed, 53 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index 48c5ba472721..e2bd93e1b49b 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -249,6 +249,28 @@
&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index d287d75e1a54..95f947eb824c 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -550,6 +550,37 @@
sgmiisys: sgmiisys@1b128000 {
compatible = "mediatek,mt7622-sgmiisys",
"syscon";
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 74 ++++++++++++++++++++++++++++
2 files changed, 84 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index e2bd93e1b49b..72ef4434bcef 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -54,6 +54,16 @@
&pio {
/* eMMC is shared pin with parallel NAND */
emmc_pins_default: emmc-pins-default {
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 95f947eb824c..cc026ebda2f4 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -542,6 +542,80 @@
ethsys: syscon@1b000000 {
compatible = "mediatek,mt7622-ethsys",
"syscon";
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 40 ++++++++++++++++++++++++++++
2 files changed, 48 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index 72ef4434bcef..6715ffa5c15e 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -323,6 +323,14 @@
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spic0_pins>;
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index cc026ebda2f4..881bc17f8f0d 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -9,6 +9,7 @@
ethsys: syscon@1b000000 {
compatible = "mediatek,mt7622-ethsys",
"syscon";
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 51 ++++++++++++++++++++++++++++
2 files changed, 79 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index 6715ffa5c15e..cc89e2e3c597 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -52,6 +52,24 @@
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 881bc17f8f0d..bad1e997359a 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -535,6 +535,57 @@
pciesys: pciesys@1a100800 {
compatible = "mediatek,mt7622-pciesys",
"syscon";
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index bad1e997359a..ffb934b0a097 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -715,6 +715,16 @@
eth: ethernet@1b100000 {
compatible = "mediatek,mt7622-eth",
"mediatek,mt2701-eth",
---
-2.11.0
-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 20 +++++
2 files changed, 126 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index cc89e2e3c597..45d8655ee423 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -8,6 +8,7 @@
&nandc {
pinctrl-names = "default";
pinctrl-0 = <¶llel_nand_pins>;
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index ffb934b0a097..0f1ebddd6619 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -527,6 +527,26 @@
ssusbsys: ssusbsys@1a000000 {
compatible = "mediatek,mt7622-ssusbsys",
"syscon";
---
-2.11.0
-
1 file changed, 275 insertions(+)
create mode 100644 arch/arm64/configs/mt7622_rfb1_defconfig
-diff --git a/arch/arm64/configs/mt7622_rfb1_defconfig b/arch/arm64/configs/mt7622_rfb1_defconfig
-new file mode 100644
-index 000000000000..1870c601cc0f
--- /dev/null
+++ b/arch/arm64/configs/mt7622_rfb1_defconfig
@@ -0,0 +1,275 @@
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_FTRACE is not set
---
-2.11.0
-
+++ /dev/null
-From fa89f53bd7288d6aa7a982841119e7123faf5a53 Mon Sep 17 00:00:00 2001
-From: Evan Wang <xswang@marvell.com>
-Date: Fri, 13 Apr 2018 12:32:30 +0800
-Subject: [PATCH] libahci: Allow drivers to override stop_engine
-
-Marvell armada37xx, armada7k and armada8k share the same
-AHCI sata controller IP, and currently there is an issue
-(Errata Ref#226)that the SATA can not be detected via SATA
-Port-MultiPlayer(PMP). After debugging, the reason is
-found that the value of Port-x FIS-based Switching Control
-(PxFBS@0x40) became wrong.
-According to design, the bits[11:8, 0] of register PxFBS
-are cleared when Port Command and Status (0x18) bit[0]
-changes its value from 1 to 0, i.e. falling edge of Port
-Command and Status bit[0] sends PULSE that resets PxFBS
-bits[11:8; 0].
-So it needs save the port PxFBS register before PxCMD
-ST write and restore the port PxFBS register afterwards
-in ahci_stop_engine().
-
-This commit allows drivers to override ahci_stop_engine
-behavior for use by the Marvell AHCI driver(and potentially
-other drivers in the future).
-
-Signed-off-by: Evan Wang <xswang@marvell.com>
-Cc: Ofer Heifetz <oferh@marvell.com>
-Cc: Tejun Heo <tj@kernel.org>
-Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
----
- drivers/ata/ahci.c | 6 +++---
- drivers/ata/ahci.h | 7 +++++++
- drivers/ata/ahci_qoriq.c | 2 +-
- drivers/ata/ahci_xgene.c | 4 ++--
- drivers/ata/libahci.c | 20 ++++++++++++--------
- drivers/ata/sata_highbank.c | 2 +-
- 6 files changed, 26 insertions(+), 15 deletions(-)
-
-diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
-index 1ff17799769d0..6389c88b3500a 100644
---- a/drivers/ata/ahci.c
-+++ b/drivers/ata/ahci.c
-@@ -698,7 +698,7 @@ static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class,
-
- DPRINTK("ENTER\n");
-
-- ahci_stop_engine(ap);
-+ hpriv->stop_engine(ap);
-
- rc = sata_link_hardreset(link, sata_ehc_deb_timing(&link->eh_context),
- deadline, &online, NULL);
-@@ -724,7 +724,7 @@ static int ahci_p5wdh_hardreset(struct ata_link *link, unsigned int *class,
- bool online;
- int rc;
-
-- ahci_stop_engine(ap);
-+ hpriv->stop_engine(ap);
-
- /* clear D2H reception area to properly wait for D2H FIS */
- ata_tf_init(link->device, &tf);
-@@ -788,7 +788,7 @@ static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class,
-
- DPRINTK("ENTER\n");
-
-- ahci_stop_engine(ap);
-+ hpriv->stop_engine(ap);
-
- for (i = 0; i < 2; i++) {
- u16 val;
-diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
-index a9d996e17d75e..824bd399f02ea 100644
---- a/drivers/ata/ahci.h
-+++ b/drivers/ata/ahci.h
-@@ -365,6 +365,13 @@ struct ahci_host_priv {
- * be overridden anytime before the host is activated.
- */
- void (*start_engine)(struct ata_port *ap);
-+ /*
-+ * Optional ahci_stop_engine override, if not set this gets set to the
-+ * default ahci_stop_engine during ahci_save_initial_config, this can
-+ * be overridden anytime before the host is activated.
-+ */
-+ int (*stop_engine)(struct ata_port *ap);
-+
- irqreturn_t (*irq_handler)(int irq, void *dev_instance);
-
- /* only required for per-port MSI(-X) support */
-diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c
-index 2685f28160f70..cfdef4d44ae92 100644
---- a/drivers/ata/ahci_qoriq.c
-+++ b/drivers/ata/ahci_qoriq.c
-@@ -96,7 +96,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
-
- DPRINTK("ENTER\n");
-
-- ahci_stop_engine(ap);
-+ hpriv->stop_engine(ap);
-
- /*
- * There is a errata on ls1021a Rev1.0 and Rev2.0 which is:
-diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
-index c2b5941d9184d..ad58da7c9affd 100644
---- a/drivers/ata/ahci_xgene.c
-+++ b/drivers/ata/ahci_xgene.c
-@@ -165,7 +165,7 @@ static int xgene_ahci_restart_engine(struct ata_port *ap)
- PORT_CMD_ISSUE, 0x0, 1, 100))
- return -EBUSY;
-
-- ahci_stop_engine(ap);
-+ hpriv->stop_engine(ap);
- ahci_start_fis_rx(ap);
-
- /*
-@@ -421,7 +421,7 @@ static int xgene_ahci_hardreset(struct ata_link *link, unsigned int *class,
- portrxfis_saved = readl(port_mmio + PORT_FIS_ADDR);
- portrxfishi_saved = readl(port_mmio + PORT_FIS_ADDR_HI);
-
-- ahci_stop_engine(ap);
-+ hpriv->stop_engine(ap);
-
- rc = xgene_ahci_do_hardreset(link, deadline, &online);
-
-diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
-index 7adcf3caabd00..e5d90977caec2 100644
---- a/drivers/ata/libahci.c
-+++ b/drivers/ata/libahci.c
-@@ -560,6 +560,9 @@ void ahci_save_initial_config(struct device *dev, struct ahci_host_priv *hpriv)
- if (!hpriv->start_engine)
- hpriv->start_engine = ahci_start_engine;
-
-+ if (!hpriv->stop_engine)
-+ hpriv->stop_engine = ahci_stop_engine;
-+
- if (!hpriv->irq_handler)
- hpriv->irq_handler = ahci_single_level_irq_intr;
- }
-@@ -897,9 +900,10 @@ static void ahci_start_port(struct ata_port *ap)
- static int ahci_deinit_port(struct ata_port *ap, const char **emsg)
- {
- int rc;
-+ struct ahci_host_priv *hpriv = ap->host->private_data;
-
- /* disable DMA */
-- rc = ahci_stop_engine(ap);
-+ rc = hpriv->stop_engine(ap);
- if (rc) {
- *emsg = "failed to stop engine";
- return rc;
-@@ -1310,7 +1314,7 @@ int ahci_kick_engine(struct ata_port *ap)
- int busy, rc;
-
- /* stop engine */
-- rc = ahci_stop_engine(ap);
-+ rc = hpriv->stop_engine(ap);
- if (rc)
- goto out_restart;
-
-@@ -1549,7 +1553,7 @@ int ahci_do_hardreset(struct ata_link *link, unsigned int *class,
-
- DPRINTK("ENTER\n");
-
-- ahci_stop_engine(ap);
-+ hpriv->stop_engine(ap);
-
- /* clear D2H reception area to properly wait for D2H FIS */
- ata_tf_init(link->device, &tf);
-@@ -2075,14 +2079,14 @@ void ahci_error_handler(struct ata_port *ap)
-
- if (!(ap->pflags & ATA_PFLAG_FROZEN)) {
- /* restart engine */
-- ahci_stop_engine(ap);
-+ hpriv->stop_engine(ap);
- hpriv->start_engine(ap);
- }
-
- sata_pmp_error_handler(ap);
-
- if (!ata_dev_enabled(ap->link.device))
-- ahci_stop_engine(ap);
-+ hpriv->stop_engine(ap);
- }
- EXPORT_SYMBOL_GPL(ahci_error_handler);
-
-@@ -2129,7 +2133,7 @@ static void ahci_set_aggressive_devslp(struct ata_port *ap, bool sleep)
- return;
-
- /* set DITO, MDAT, DETO and enable DevSlp, need to stop engine first */
-- rc = ahci_stop_engine(ap);
-+ rc = hpriv->stop_engine(ap);
- if (rc)
- return;
-
-@@ -2189,7 +2193,7 @@ static void ahci_enable_fbs(struct ata_port *ap)
- return;
- }
-
-- rc = ahci_stop_engine(ap);
-+ rc = hpriv->stop_engine(ap);
- if (rc)
- return;
-
-@@ -2222,7 +2226,7 @@ static void ahci_disable_fbs(struct ata_port *ap)
- return;
- }
-
-- rc = ahci_stop_engine(ap);
-+ rc = hpriv->stop_engine(ap);
- if (rc)
- return;
-
-diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
-index aafb8cc035232..e67815b896fcc 100644
---- a/drivers/ata/sata_highbank.c
-+++ b/drivers/ata/sata_highbank.c
-@@ -410,7 +410,7 @@ static int ahci_highbank_hardreset(struct ata_link *link, unsigned int *class,
- int rc;
- int retry = 100;
-
-- ahci_stop_engine(ap);
-+ hpriv->stop_engine(ap);
-
- /* clear D2H reception area to properly wait for D2H FIS */
- ata_tf_init(link->device, &tf);
-
+++ /dev/null
-From daa2e3bdbb0b3e691cf20a042350817310cb8cb5 Mon Sep 17 00:00:00 2001
-From: Evan Wang <xswang@marvell.com>
-Date: Fri, 13 Apr 2018 12:32:31 +0800
-Subject: [PATCH] ata: ahci: mvebu: override ahci_stop_engine for mvebu AHCI
-
-There is an issue(Errata Ref#226) that the SATA can not be
-detected via SATA Port-MultiPlayer(PMP) with following
-error log:
- ata1.15: PMP product ID mismatch
- ata1.15: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
- ata1.15: Port Multiplier vendor mismatch '0x1b4b'!='0x0'
- ata1.15: PMP revalidation failed (errno=-19)
-
-After debugging, the reason is found that the value Port-x
-FIS-based Switching Control(PxFBS@0x40) become wrong.
-According to design, the bits[11:8, 0] of register PxFBS
-are cleared when Port Command and Status (0x18) bit[0]
-changes its value from 1 to 0, i.e. falling edge of Port
-Command and Status bit[0] sends PULSE that resets PxFBS
-bits[11:8; 0].
-So it needs a mvebu SATA WA to save the port PxFBS register
-before PxCMD ST write and restore it afterwards.
-
-This patch implements the WA in a separate function of
-ahci_mvebu_stop_engine to override ahci_stop_gngine.
-
-Signed-off-by: Evan Wang <xswang@marvell.com>
-Cc: Ofer Heifetz <oferh@marvell.com>
-Cc: Tejun Heo <tj@kernel.org>
-Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
----
- drivers/ata/ahci_mvebu.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 56 insertions(+)
-
-diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
-index de7128d81e9cc..0045dacd814b4 100644
---- a/drivers/ata/ahci_mvebu.c
-+++ b/drivers/ata/ahci_mvebu.c
-@@ -62,6 +62,60 @@ static void ahci_mvebu_regret_option(struct ahci_host_priv *hpriv)
- writel(0x80, hpriv->mmio + AHCI_VENDOR_SPECIFIC_0_DATA);
- }
-
-+/**
-+ * ahci_mvebu_stop_engine
-+ *
-+ * @ap: Target ata port
-+ *
-+ * Errata Ref#226 - SATA Disk HOT swap issue when connected through
-+ * Port Multiplier in FIS-based Switching mode.
-+ *
-+ * To avoid the issue, according to design, the bits[11:8, 0] of
-+ * register PxFBS are cleared when Port Command and Status (0x18) bit[0]
-+ * changes its value from 1 to 0, i.e. falling edge of Port
-+ * Command and Status bit[0] sends PULSE that resets PxFBS
-+ * bits[11:8; 0].
-+ *
-+ * This function is used to override function of "ahci_stop_engine"
-+ * from libahci.c by adding the mvebu work around(WA) to save PxFBS
-+ * value before the PxCMD ST write of 0, then restore PxFBS value.
-+ *
-+ * Return: 0 on success; Error code otherwise.
-+ */
-+int ahci_mvebu_stop_engine(struct ata_port *ap)
-+{
-+ void __iomem *port_mmio = ahci_port_base(ap);
-+ u32 tmp, port_fbs;
-+
-+ tmp = readl(port_mmio + PORT_CMD);
-+
-+ /* check if the HBA is idle */
-+ if ((tmp & (PORT_CMD_START | PORT_CMD_LIST_ON)) == 0)
-+ return 0;
-+
-+ /* save the port PxFBS register for later restore */
-+ port_fbs = readl(port_mmio + PORT_FBS);
-+
-+ /* setting HBA to idle */
-+ tmp &= ~PORT_CMD_START;
-+ writel(tmp, port_mmio + PORT_CMD);
-+
-+ /*
-+ * bit #15 PxCMD signal doesn't clear PxFBS,
-+ * restore the PxFBS register right after clearing the PxCMD ST,
-+ * no need to wait for the PxCMD bit #15.
-+ */
-+ writel(port_fbs, port_mmio + PORT_FBS);
-+
-+ /* wait for engine to stop. This could be as long as 500 msec */
-+ tmp = ata_wait_register(ap, port_mmio + PORT_CMD,
-+ PORT_CMD_LIST_ON, PORT_CMD_LIST_ON, 1, 500);
-+ if (tmp & PORT_CMD_LIST_ON)
-+ return -EIO;
-+
-+ return 0;
-+}
-+
- #ifdef CONFIG_PM_SLEEP
- static int ahci_mvebu_suspend(struct platform_device *pdev, pm_message_t state)
- {
-@@ -112,6 +166,8 @@ static int ahci_mvebu_probe(struct platform_device *pdev)
- if (rc)
- return rc;
-
-+ hpriv->stop_engine = ahci_mvebu_stop_engine;
-+
- if (of_device_is_compatible(pdev->dev.of_node,
- "marvell,armada-380-ahci")) {
- dram = mv_mbus_dram_info();
-
rename arch/arm/boot/dts/{wd-mbwe.dts => ox810se-wd-mbwe.dts} (100%)
rename arch/arm/boot/dts/{cloudengines-pogoplug-series-3.dts => ox820-cloudengines-pogoplug-series-3.dts} (100%)
-diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
-index eff87a344566..1ae23ffa6ff4 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -685,8 +685,8 @@ dtb-$(CONFIG_ARCH_ACTIONS) += \
dtb-$(CONFIG_ARCH_QCOM) += \
qcom-apq8060-dragonboard.dtb \
qcom-apq8064-arrow-sd-600eval.dtb \
-diff --git a/arch/arm/boot/dts/wd-mbwe.dts b/arch/arm/boot/dts/ox810se-wd-mbwe.dts
-similarity index 100%
-rename from arch/arm/boot/dts/wd-mbwe.dts
-rename to arch/arm/boot/dts/ox810se-wd-mbwe.dts
-diff --git a/arch/arm/boot/dts/cloudengines-pogoplug-series-3.dts b/arch/arm/boot/dts/ox820-cloudengines-pogoplug-series-3.dts
-similarity index 100%
-rename from arch/arm/boot/dts/cloudengines-pogoplug-series-3.dts
-rename to arch/arm/boot/dts/ox820-cloudengines-pogoplug-series-3.dts
---
-2.17.1
-
+--- a/arch/arm/boot/dts/cloudengines-pogoplug-series-3.dts
++++ /dev/null
+@@ -1,94 +0,0 @@
+-/*
+- * cloudengines-pogoplug-series-3.dtsi - Device tree file for Cloud Engines PogoPlug Series 3
+- *
+- * Copyright (C) 2016 Neil Armstrong <narmstrong@baylibre.com>
+- *
+- * Licensed under GPLv2 or later
+- */
+-
+-/dts-v1/;
+-#include "ox820.dtsi"
+-
+-/ {
+- model = "Cloud Engines PogoPlug Series 3";
+-
+- compatible = "cloudengines,pogoplugv3", "oxsemi,ox820";
+-
+- chosen {
+- bootargs = "earlyprintk";
+- stdout-path = "serial0:115200n8";
+- };
+-
+- memory {
+- /* 128Mbytes DDR */
+- reg = <0x60000000 0x8000000>;
+- };
+-
+- aliases {
+- serial0 = &uart0;
+- gpio0 = &gpio0;
+- gpio1 = &gpio1;
+- };
+-
+- leds {
+- compatible = "gpio-leds";
+-
+- blue {
+- label = "pogoplug:blue";
+- gpios = <&gpio0 2 0>;
+- default-state = "keep";
+- };
+-
+- orange {
+- label = "pogoplug:orange";
+- gpios = <&gpio1 16 1>;
+- default-state = "keep";
+- };
+-
+- green {
+- label = "pogoplug:green";
+- gpios = <&gpio1 17 1>;
+- default-state = "keep";
+- };
+- };
+-};
+-
+-&uart0 {
+- status = "okay";
+-
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_uart0>;
+-};
+-
+-&nandc {
+- status = "okay";
+-
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_nand>;
+-
+- nand@0 {
+- reg = <0>;
+- #address-cells = <1>;
+- #size-cells = <1>;
+- nand-ecc-mode = "soft";
+- nand-ecc-algo = "hamming";
+-
+- partition@0 {
+- label = "boot";
+- reg = <0x00000000 0x00e00000>;
+- read-only;
+- };
+-
+- partition@e00000 {
+- label = "ubi";
+- reg = <0x00e00000 0x07200000>;
+- };
+- };
+-};
+-
+-ða {
+- status = "okay";
+-
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_etha_mdio>;
+-};
+--- /dev/null
++++ b/arch/arm/boot/dts/ox810se-wd-mbwe.dts
+@@ -0,0 +1,112 @@
++/*
++ * wd-mbwe.dtsi - Device tree file for Western Digital My Book World Edition
++ *
++ * Copyright (C) 2016 Neil Armstrong <narmstrong@baylibre.com>
++ *
++ * Licensed under GPLv2 or later
++ */
++
++/dts-v1/;
++#include "ox810se.dtsi"
++
++/ {
++ model = "Western Digital My Book World Edition";
++
++ compatible = "wd,mbwe", "oxsemi,ox810se";
++
++ chosen {
++ bootargs = "console=ttyS1,115200n8 earlyprintk=serial";
++ };
++
++ memory {
++ /* 128Mbytes DDR */
++ reg = <0x48000000 0x8000000>;
++ };
++
++ aliases {
++ serial1 = &uart1;
++ gpio0 = &gpio0;
++ gpio1 = &gpio1;
++ };
++
++ gpio-keys-polled {
++ compatible = "gpio-keys-polled";
++ #address-cells = <1>;
++ #size-cells = <0>;
++ poll-interval = <100>;
++
++ power {
++ label = "power";
++ gpios = <&gpio0 0 1>;
++ linux,code = <0x198>;
++ };
++
++ recovery {
++ label = "recovery";
++ gpios = <&gpio0 4 1>;
++ linux,code = <0xab>;
++ };
++ };
++
++ leds {
++ compatible = "gpio-leds";
++
++ a0 {
++ label = "activity0";
++ gpios = <&gpio0 25 0>;
++ default-state = "keep";
++ };
++
++ a1 {
++ label = "activity1";
++ gpios = <&gpio0 26 0>;
++ default-state = "keep";
++ };
++
++ a2 {
++ label = "activity2";
++ gpios = <&gpio0 5 0>;
++ default-state = "keep";
++ };
++
++ a3 {
++ label = "activity3";
++ gpios = <&gpio0 6 0>;
++ default-state = "keep";
++ };
++
++ a4 {
++ label = "activity4";
++ gpios = <&gpio0 7 0>;
++ default-state = "keep";
++ };
++
++ a5 {
++ label = "activity5";
++ gpios = <&gpio1 2 0>;
++ default-state = "keep";
++ };
++ };
++
++ i2c-gpio {
++ compatible = "i2c-gpio";
++ gpios = <&gpio0 3 0 /* sda */
++ &gpio0 2 0 /* scl */
++ >;
++ i2c-gpio,delay-us = <2>; /* ~100 kHz */
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ rtc0: rtc@48 {
++ compatible = "st,m41t00";
++ reg = <0x68>;
++ };
++ };
++};
++
++&uart1 {
++ status = "okay";
++
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_uart1>;
++};
+--- /dev/null
++++ b/arch/arm/boot/dts/ox820-cloudengines-pogoplug-series-3.dts
+@@ -0,0 +1,94 @@
++/*
++ * cloudengines-pogoplug-series-3.dtsi - Device tree file for Cloud Engines PogoPlug Series 3
++ *
++ * Copyright (C) 2016 Neil Armstrong <narmstrong@baylibre.com>
++ *
++ * Licensed under GPLv2 or later
++ */
++
++/dts-v1/;
++#include "ox820.dtsi"
++
++/ {
++ model = "Cloud Engines PogoPlug Series 3";
++
++ compatible = "cloudengines,pogoplugv3", "oxsemi,ox820";
++
++ chosen {
++ bootargs = "earlyprintk";
++ stdout-path = "serial0:115200n8";
++ };
++
++ memory {
++ /* 128Mbytes DDR */
++ reg = <0x60000000 0x8000000>;
++ };
++
++ aliases {
++ serial0 = &uart0;
++ gpio0 = &gpio0;
++ gpio1 = &gpio1;
++ };
++
++ leds {
++ compatible = "gpio-leds";
++
++ blue {
++ label = "pogoplug:blue";
++ gpios = <&gpio0 2 0>;
++ default-state = "keep";
++ };
++
++ orange {
++ label = "pogoplug:orange";
++ gpios = <&gpio1 16 1>;
++ default-state = "keep";
++ };
++
++ green {
++ label = "pogoplug:green";
++ gpios = <&gpio1 17 1>;
++ default-state = "keep";
++ };
++ };
++};
++
++&uart0 {
++ status = "okay";
++
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_uart0>;
++};
++
++&nandc {
++ status = "okay";
++
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_nand>;
++
++ nand@0 {
++ reg = <0>;
++ #address-cells = <1>;
++ #size-cells = <1>;
++ nand-ecc-mode = "soft";
++ nand-ecc-algo = "hamming";
++
++ partition@0 {
++ label = "boot";
++ reg = <0x00000000 0x00e00000>;
++ read-only;
++ };
++
++ partition@e00000 {
++ label = "ubi";
++ reg = <0x00e00000 0x07200000>;
++ };
++ };
++};
++
++ða {
++ status = "okay";
++
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_etha_mdio>;
++};
+--- a/arch/arm/boot/dts/wd-mbwe.dts
++++ /dev/null
+@@ -1,112 +0,0 @@
+-/*
+- * wd-mbwe.dtsi - Device tree file for Western Digital My Book World Edition
+- *
+- * Copyright (C) 2016 Neil Armstrong <narmstrong@baylibre.com>
+- *
+- * Licensed under GPLv2 or later
+- */
+-
+-/dts-v1/;
+-#include "ox810se.dtsi"
+-
+-/ {
+- model = "Western Digital My Book World Edition";
+-
+- compatible = "wd,mbwe", "oxsemi,ox810se";
+-
+- chosen {
+- bootargs = "console=ttyS1,115200n8 earlyprintk=serial";
+- };
+-
+- memory {
+- /* 128Mbytes DDR */
+- reg = <0x48000000 0x8000000>;
+- };
+-
+- aliases {
+- serial1 = &uart1;
+- gpio0 = &gpio0;
+- gpio1 = &gpio1;
+- };
+-
+- gpio-keys-polled {
+- compatible = "gpio-keys-polled";
+- #address-cells = <1>;
+- #size-cells = <0>;
+- poll-interval = <100>;
+-
+- power {
+- label = "power";
+- gpios = <&gpio0 0 1>;
+- linux,code = <0x198>;
+- };
+-
+- recovery {
+- label = "recovery";
+- gpios = <&gpio0 4 1>;
+- linux,code = <0xab>;
+- };
+- };
+-
+- leds {
+- compatible = "gpio-leds";
+-
+- a0 {
+- label = "activity0";
+- gpios = <&gpio0 25 0>;
+- default-state = "keep";
+- };
+-
+- a1 {
+- label = "activity1";
+- gpios = <&gpio0 26 0>;
+- default-state = "keep";
+- };
+-
+- a2 {
+- label = "activity2";
+- gpios = <&gpio0 5 0>;
+- default-state = "keep";
+- };
+-
+- a3 {
+- label = "activity3";
+- gpios = <&gpio0 6 0>;
+- default-state = "keep";
+- };
+-
+- a4 {
+- label = "activity4";
+- gpios = <&gpio0 7 0>;
+- default-state = "keep";
+- };
+-
+- a5 {
+- label = "activity5";
+- gpios = <&gpio1 2 0>;
+- default-state = "keep";
+- };
+- };
+-
+- i2c-gpio {
+- compatible = "i2c-gpio";
+- gpios = <&gpio0 3 0 /* sda */
+- &gpio0 2 0 /* scl */
+- >;
+- i2c-gpio,delay-us = <2>; /* ~100 kHz */
+- #address-cells = <1>;
+- #size-cells = <0>;
+-
+- rtc0: rtc@48 {
+- compatible = "st,m41t00";
+- reg = <0x68>;
+- };
+- };
+-};
+-
+-&uart1 {
+- status = "okay";
+-
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_uart1>;
+-};
MAINTAINERS | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
-diff --git a/MAINTAINERS b/MAINTAINERS
-index 546beb6b0176..6ecdaed0a3ef 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -1677,9 +1677,7 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
+@@ -1677,9 +1677,7 @@ L: linux-arm-kernel@lists.infradead.org
L: linux-oxnas@lists.tuxfamily.org (moderated for non-subscribers)
S: Maintained
F: arch/arm/mach-oxnas/
N: oxnas
ARM/PALM TREO SUPPORT
---
-2.17.1
-
1 file changed, 93 insertions(+)
create mode 100644 arch/arm/configs/oxnas_v6_defconfig
-diff --git a/arch/arm/configs/oxnas_v6_defconfig b/arch/arm/configs/oxnas_v6_defconfig
-new file mode 100644
-index 000000000000..f6ba32c9d173
--- /dev/null
+++ b/arch/arm/configs/oxnas_v6_defconfig
@@ -0,0 +1,93 @@
+CONFIG_NLS_UTF8=y
+CONFIG_PRINTK_TIME=y
+CONFIG_MAGIC_SYSRQ=y
---
-2.17.1
-
include/dt-bindings/clock/oxsemi,ox820.h | 32 +++++++++++-------------
2 files changed, 14 insertions(+), 20 deletions(-)
-diff --git a/drivers/clk/clk-oxnas.c b/drivers/clk/clk-oxnas.c
-index e51e0023fc6e..da6af71649de 100644
--- a/drivers/clk/clk-oxnas.c
+++ b/drivers/clk/clk-oxnas.c
@@ -40,8 +40,6 @@ struct oxnas_stdclk_data {
};
/* Regmap offsets */
-diff --git a/include/dt-bindings/clock/oxsemi,ox820.h b/include/dt-bindings/clock/oxsemi,ox820.h
-index f661ecc8d760..35b44ca1b104 100644
--- a/include/dt-bindings/clock/oxsemi,ox820.h
+++ b/include/dt-bindings/clock/oxsemi,ox820.h
@@ -17,24 +17,20 @@
+#define CLK_820_USBDEV 13
#endif /* DT_CLOCK_OXSEMI_OX820_H */
---
-2.17.1
-
/* Standard regmap gate clocks */
struct clk_oxnas_gate {
struct clk_hw hw;
-@@ -49,6 +70,135 @@ struct oxnas_stdclk_data {
+@@ -47,6 +70,135 @@ struct oxnas_stdclk_data {
#define CLK_SET_REGOFFSET 0x2c
#define CLK_CLR_REGOFFSET 0x30
static inline struct clk_oxnas_gate *to_clk_oxnas_gate(struct clk_hw *hw)
{
return container_of(hw, struct clk_oxnas_gate, hw);
-@@ -262,3 +412,42 @@ static struct platform_driver oxnas_stdc
+@@ -260,3 +412,42 @@ static struct platform_driver oxnas_stdc
},
};
builtin_platform_driver(oxnas_stdclk_driver);
--- a/arch/arm/boot/dts/ox820.dtsi
+++ b/arch/arm/boot/dts/ox820.dtsi
-@@ -302,6 +302,83 @@
+@@ -307,6 +307,83 @@
reg = <0x1000 0x1000>,
<0x100 0x500>;
};
obj-$(CONFIG_PATA_ALI) += pata_ali.o
--- a/arch/arm/boot/dts/ox820.dtsi
+++ b/arch/arm/boot/dts/ox820.dtsi
-@@ -380,5 +380,20 @@
+@@ -385,5 +385,20 @@
};
};
---- linux-4.14.44.orig/arch/arm/mach-oxnas/Kconfig
-+++ linux-4.14.44/arch/arm/mach-oxnas/Kconfig
+--- a/arch/arm/mach-oxnas/Kconfig
++++ b/arch/arm/mach-oxnas/Kconfig
@@ -1,6 +1,7 @@
menuconfig ARCH_OXNAS
bool "Oxford Semiconductor OXNAS Family SoCs"
obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
--- a/arch/arm/boot/dts/ox820.dtsi
+++ b/arch/arm/boot/dts/ox820.dtsi
-@@ -120,6 +120,22 @@
+@@ -105,6 +105,22 @@
status = "disabled";
};
}
--- a/init/main.c
+++ b/init/main.c
-@@ -96,6 +96,10 @@
+@@ -95,6 +95,10 @@
#include <asm/sections.h>
#include <asm/cacheflush.h>
static int kernel_init(void *);
extern void init_IRQ(void);
-@@ -575,6 +579,18 @@ asmlinkage __visible void __init start_k
+@@ -574,6 +578,18 @@ asmlinkage __visible void __init start_k
page_alloc_init();
pr_notice("Kernel command line: %s\n", boot_command_line);
/* initialize internal qc */
/* XXX: Tag 0 is used for drivers with legacy EH as some
-@@ -5096,6 +5104,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -5124,6 +5132,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
return NULL;
/* libsas case */
if (ap->flags & ATA_FLAG_SAS_HOST) {
tag = ata_sas_allocate_tag(ap);
-@@ -5141,6 +5152,8 @@ void ata_qc_free(struct ata_queued_cmd *
+@@ -5169,6 +5180,8 @@ void ata_qc_free(struct ata_queued_cmd *
qc->tag = ATA_TAG_POISON;
if (ap->flags & ATA_FLAG_SAS_HOST)
ata_sas_free_tag(tag, ap);