move 5.18-rc5 support jetson-nano (#3754)
This commit is contained in:
parent
23522324cc
commit
0f7606e653
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 5.17.4 Kernel Configuration
|
||||
# Linux/arm64 5.17.5 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="aarch64-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
@ -3070,8 +3070,6 @@ CONFIG_BNXT_SRIOV=y
|
||||
CONFIG_BNXT_FLOWER_OFFLOAD=y
|
||||
# CONFIG_BNXT_DCB is not set
|
||||
CONFIG_BNXT_HWMON=y
|
||||
CONFIG_NET_VENDOR_BROCADE=y
|
||||
CONFIG_BNA=m
|
||||
CONFIG_NET_VENDOR_CADENCE=y
|
||||
CONFIG_MACB=y
|
||||
CONFIG_MACB_USE_HWSTAMP=y
|
||||
@ -3145,7 +3143,6 @@ CONFIG_I40EVF=m
|
||||
# CONFIG_ICE is not set
|
||||
CONFIG_FM10K=m
|
||||
# CONFIG_IGC is not set
|
||||
CONFIG_NET_VENDOR_MICROSOFT=y
|
||||
CONFIG_JME=m
|
||||
CONFIG_NET_VENDOR_LITEX=y
|
||||
CONFIG_LITEX_LITEETH=m
|
||||
@ -3200,9 +3197,12 @@ CONFIG_ENC28J60_WRITEVERIFY=y
|
||||
CONFIG_NET_VENDOR_MICROSEMI=y
|
||||
CONFIG_MSCC_OCELOT_SWITCH_LIB=m
|
||||
CONFIG_MSCC_OCELOT_SWITCH=m
|
||||
CONFIG_NET_VENDOR_MICROSOFT=y
|
||||
CONFIG_NET_VENDOR_MYRI=y
|
||||
CONFIG_MYRI10GE=m
|
||||
CONFIG_FEALNX=m
|
||||
CONFIG_NET_VENDOR_NI=y
|
||||
# CONFIG_NI_XGE_MANAGEMENT_ENET is not set
|
||||
CONFIG_NET_VENDOR_NATSEMI=y
|
||||
CONFIG_NATSEMI=m
|
||||
CONFIG_NS83820=m
|
||||
@ -3211,8 +3211,6 @@ CONFIG_NET_VENDOR_NETERION=y
|
||||
# CONFIG_VXGE is not set
|
||||
CONFIG_NET_VENDOR_NETRONOME=y
|
||||
# CONFIG_NFP is not set
|
||||
CONFIG_NET_VENDOR_NI=y
|
||||
# CONFIG_NI_XGE_MANAGEMENT_ENET is not set
|
||||
CONFIG_NET_VENDOR_8390=y
|
||||
CONFIG_NE2K_PCI=m
|
||||
CONFIG_NET_VENDOR_NVIDIA=y
|
||||
@ -3229,6 +3227,8 @@ CONFIG_NET_VENDOR_QLOGIC=y
|
||||
# CONFIG_QLCNIC is not set
|
||||
# CONFIG_NETXEN_NIC is not set
|
||||
# CONFIG_QED is not set
|
||||
CONFIG_NET_VENDOR_BROCADE=y
|
||||
CONFIG_BNA=m
|
||||
CONFIG_NET_VENDOR_QUALCOMM=y
|
||||
CONFIG_QCA7000=m
|
||||
# CONFIG_QCA7000_SPI is not set
|
||||
@ -3251,14 +3251,14 @@ CONFIG_ROCKER=m
|
||||
CONFIG_NET_VENDOR_SAMSUNG=y
|
||||
# CONFIG_SXGBE_ETH is not set
|
||||
CONFIG_NET_VENDOR_SEEQ=y
|
||||
CONFIG_NET_VENDOR_SOLARFLARE=y
|
||||
# CONFIG_SFC is not set
|
||||
# CONFIG_SFC_FALCON is not set
|
||||
CONFIG_NET_VENDOR_SILAN=y
|
||||
# CONFIG_SC92031 is not set
|
||||
CONFIG_NET_VENDOR_SIS=y
|
||||
# CONFIG_SIS900 is not set
|
||||
# CONFIG_SIS190 is not set
|
||||
CONFIG_NET_VENDOR_SOLARFLARE=y
|
||||
# CONFIG_SFC is not set
|
||||
# CONFIG_SFC_FALCON is not set
|
||||
CONFIG_NET_VENDOR_SMSC=y
|
||||
CONFIG_SMC91X=y
|
||||
# CONFIG_EPIC100 is not set
|
||||
@ -6128,7 +6128,6 @@ CONFIG_DRM_MIPI_DBI=m
|
||||
CONFIG_DRM_MIPI_DSI=y
|
||||
CONFIG_DRM_DP_AUX_BUS=m
|
||||
# CONFIG_DRM_DP_AUX_CHARDEV is not set
|
||||
# CONFIG_DRM_DEBUG_MM is not set
|
||||
# CONFIG_DRM_DEBUG_SELFTEST is not set
|
||||
CONFIG_DRM_KMS_HELPER=m
|
||||
# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set
|
||||
@ -6468,7 +6467,6 @@ CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_DUMMY_CONSOLE_COLUMNS=80
|
||||
CONFIG_DUMMY_CONSOLE_ROWS=25
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set
|
||||
|
||||
@ -3786,10 +3786,11 @@ CONFIG_WLCORE=m
|
||||
CONFIG_WLCORE_SPI=m
|
||||
CONFIG_WLCORE_SDIO=m
|
||||
CONFIG_WILINK_PLATFORM_DATA=y
|
||||
# CONFIG_RTL8822BU is not set
|
||||
# CONFIG_RTL8822BS is not set
|
||||
CONFIG_RTL8723DU=m
|
||||
CONFIG_RTL8723DS=m
|
||||
# CONFIG_RTL8822CS is not set
|
||||
# CONFIG_RTL8822BU is not set
|
||||
# CONFIG_RTL8821CU is not set
|
||||
# CONFIG_88XXAU is not set
|
||||
# CONFIG_RTL8192EU is not set
|
||||
@ -5032,7 +5033,7 @@ CONFIG_ARM_SBSA_WATCHDOG=y
|
||||
CONFIG_DW_WATCHDOG=y
|
||||
CONFIG_RN5T618_WATCHDOG=m
|
||||
# CONFIG_MAX63XX_WATCHDOG is not set
|
||||
# CONFIG_MAX77620_WATCHDOG is not set
|
||||
CONFIG_MAX77620_WATCHDOG=m
|
||||
CONFIG_TEGRA_WATCHDOG=m
|
||||
CONFIG_ARM_SMC_WATCHDOG=y
|
||||
# CONFIG_ALIM7101_WDT is not set
|
||||
|
||||
@ -31,7 +31,7 @@ case $BRANCH in
|
||||
|
||||
edge)
|
||||
KERNELBRANCH="branch:linux-5.18.y"
|
||||
KERNELBRANCH="tag:v5.18-rc4"
|
||||
KERNELBRANCH="tag:v5.18-rc5"
|
||||
KERNELPATCHDIR='media-'$BRANCH
|
||||
LINUXFAMILY=media
|
||||
LINUXCONFIG='linux-media-'$BRANCH
|
||||
|
||||
@ -50,7 +50,7 @@ case $BRANCH in
|
||||
|
||||
edge)
|
||||
KERNELBRANCH="branch:linux-5.18.y"
|
||||
KERNELBRANCH="tag:v5.18-rc4"
|
||||
KERNELBRANCH="tag:v5.18-rc5"
|
||||
KERNELPATCHDIR='media-'$BRANCH
|
||||
LINUXFAMILY=media
|
||||
LINUXCONFIG='linux-media-'$BRANCH
|
||||
|
||||
@ -2797,7 +2797,7 @@ index 0000000000000..8d1323a47f822
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+// rockchip_drm_dma_init_device(vop2->drm, vop2->dev);
|
||||
+ rockchip_drm_dma_init_device(vop2->drm, vop2->dev);
|
||||
+
|
||||
+ pm_runtime_enable(&pdev->dev);
|
||||
+
|
||||
|
||||
@ -0,0 +1,115 @@
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
index 067fe4a6b178..879557595a64 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
@@ -73,6 +73,50 @@ vcc5v0_sys: vcc5v0-sys {
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&dc_12v>;
|
||||
};
|
||||
+
|
||||
+ vcc5v0_usb: vcc5v0_usb {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_usb";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&dc_12v>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb_host: vcc5v0-usb-host {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb_host_en>;
|
||||
+ regulator-name = "vcc5v0_usb_host";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_usb>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb_otg: vcc5v0-usb-otg {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb_otg_en>;
|
||||
+ regulator-name = "vcc5v0_usb_otg";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_usb>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&combphy0 {
|
||||
+ /* used for USB3 */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&combphy1 {
|
||||
+ /* used for USB3 */
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
@@ -368,6 +412,16 @@ pmic_int: pmic_int {
|
||||
<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ usb {
|
||||
+ vcc5v0_usb_host_en: vcc5v0_usb_host_en {
|
||||
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
|
||||
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&pmu_io_domains {
|
||||
@@ -485,3 +539,42 @@ &uart9 {
|
||||
pinctrl-0 = <&uart9m1_xfer>;
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_xhci {
|
||||
+ extcon = <&usb2phy0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_xhci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_host {
|
||||
+ phy-supply = <&vcc5v0_usb_host>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_otg {
|
||||
+ phy-supply = <&vcc5v0_usb_otg>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
@ -0,0 +1,27 @@
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
index 879557595a64..40cf2236c0b6 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
@@ -119,6 +119,11 @@ &combphy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&combphy2 {
|
||||
+ /* used for SATA */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&gmac0 {
|
||||
assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
|
||||
assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
|
||||
@@ -484,6 +489,10 @@ &saradc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&sata2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
max-frequency = <200000000>;
|
||||
@ -0,0 +1,63 @@
|
||||
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
|
||||
index 19f0035d4410..46dee0714382 100644
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -1522,11 +1522,11 @@ static void
|
||||
mt7530_hw_vlan_add(struct mt7530_priv *priv,
|
||||
struct mt7530_hw_vlan_entry *entry)
|
||||
{
|
||||
+ struct dsa_port *dp = dsa_to_port(priv->ds, entry->port);
|
||||
u8 new_members;
|
||||
u32 val;
|
||||
|
||||
- new_members = entry->old_members | BIT(entry->port) |
|
||||
- BIT(MT7530_CPU_PORT);
|
||||
+ new_members = entry->old_members | BIT(entry->port);
|
||||
|
||||
/* Validate the entry with independent learning, create egress tag per
|
||||
* VLAN and joining the port as one of the port members.
|
||||
@@ -1537,22 +1537,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *priv,
|
||||
|
||||
/* Decide whether adding tag or not for those outgoing packets from the
|
||||
* port inside the VLAN.
|
||||
- */
|
||||
- val = entry->untagged ? MT7530_VLAN_EGRESS_UNTAG :
|
||||
- MT7530_VLAN_EGRESS_TAG;
|
||||
- mt7530_rmw(priv, MT7530_VAWD2,
|
||||
- ETAG_CTRL_P_MASK(entry->port),
|
||||
- ETAG_CTRL_P(entry->port, val));
|
||||
-
|
||||
- /* CPU port is always taken as a tagged port for serving more than one
|
||||
+ * CPU port is always taken as a tagged port for serving more than one
|
||||
* VLANs across and also being applied with egress type stack mode for
|
||||
* that VLAN tags would be appended after hardware special tag used as
|
||||
* DSA tag.
|
||||
*/
|
||||
+ if (dsa_port_is_cpu(dp))
|
||||
+ val = MT7530_VLAN_EGRESS_STACK;
|
||||
+ else if (entry->untagged)
|
||||
+ val = MT7530_VLAN_EGRESS_UNTAG;
|
||||
+ else
|
||||
+ val = MT7530_VLAN_EGRESS_TAG;
|
||||
mt7530_rmw(priv, MT7530_VAWD2,
|
||||
- ETAG_CTRL_P_MASK(MT7530_CPU_PORT),
|
||||
- ETAG_CTRL_P(MT7530_CPU_PORT,
|
||||
- MT7530_VLAN_EGRESS_STACK));
|
||||
+ ETAG_CTRL_P_MASK(entry->port),
|
||||
+ ETAG_CTRL_P(entry->port, val));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1571,11 +1569,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *priv,
|
||||
return;
|
||||
}
|
||||
|
||||
- /* If certain member apart from CPU port is still alive in the VLAN,
|
||||
- * the entry would be kept valid. Otherwise, the entry is got to be
|
||||
- * disabled.
|
||||
- */
|
||||
- if (new_members && new_members != BIT(MT7530_CPU_PORT)) {
|
||||
+ if (new_members) {
|
||||
val = IVL_MAC | VTAG_EN | PORT_MEM(new_members) |
|
||||
VLAN_VALID;
|
||||
mt7530_write(priv, MT7530_VAWD1, val);
|
||||
@ -0,0 +1,61 @@
|
||||
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
|
||||
index 46dee0714382..144c29f8fefc 100644
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2087,11 +2087,12 @@ static int
|
||||
mt7530_setup(struct dsa_switch *ds)
|
||||
{
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
+ struct device_node *dn = NULL;
|
||||
struct device_node *phy_node;
|
||||
struct device_node *mac_np;
|
||||
struct mt7530_dummy_poll p;
|
||||
phy_interface_t interface;
|
||||
- struct device_node *dn;
|
||||
+ struct dsa_port *cpu_dp;
|
||||
u32 id, val;
|
||||
int ret, i;
|
||||
|
||||
@@ -2099,7 +2100,19 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
* controller also is the container for two GMACs nodes representing
|
||||
* as two netdev instances.
|
||||
*/
|
||||
- dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent;
|
||||
+ dsa_switch_for_each_cpu_port(cpu_dp, ds) {
|
||||
+ dn = cpu_dp->master->dev.of_node->parent;
|
||||
+ /* It doesn't matter which CPU port is found first,
|
||||
+ * their masters should share the same parent OF node
|
||||
+ */
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (!dn) {
|
||||
+ dev_err(ds->dev, "parent OF node of DSA master not found");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
ds->assisted_learning_on_cpu_port = true;
|
||||
ds->mtu_enforcement_ingress = true;
|
||||
|
||||
@@ -2260,6 +2273,7 @@ mt7531_setup(struct dsa_switch *ds)
|
||||
{
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
struct mt7530_dummy_poll p;
|
||||
+ struct dsa_port *cpu_dp;
|
||||
u32 val, id;
|
||||
int ret, i;
|
||||
|
||||
@@ -2332,8 +2346,11 @@ mt7531_setup(struct dsa_switch *ds)
|
||||
CORE_PLL_GROUP4, val);
|
||||
|
||||
/* BPDU to CPU port */
|
||||
- mt7530_rmw(priv, MT7531_CFC, MT7531_CPU_PMAP_MASK,
|
||||
- BIT(MT7530_CPU_PORT));
|
||||
+ dsa_switch_for_each_cpu_port(cpu_dp, ds) {
|
||||
+ mt7530_rmw(priv, MT7531_CFC, MT7531_CPU_PMAP_MASK,
|
||||
+ BIT(cpu_dp->index));
|
||||
+ break;
|
||||
+ }
|
||||
mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK,
|
||||
MT753X_BPDU_CPU_ONLY);
|
||||
|
||||
@ -0,0 +1,100 @@
|
||||
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
|
||||
index 144c29f8fefc..8bf27937e577 100644
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -1033,6 +1033,7 @@ static int
|
||||
mt7530_port_enable(struct dsa_switch *ds, int port,
|
||||
struct phy_device *phy)
|
||||
{
|
||||
+ struct dsa_port *dp = dsa_to_port(ds, port);
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
|
||||
mutex_lock(&priv->reg_mutex);
|
||||
@@ -1041,7 +1042,11 @@ mt7530_port_enable(struct dsa_switch *ds, int port,
|
||||
* restore the port matrix if the port is the member of a certain
|
||||
* bridge.
|
||||
*/
|
||||
- priv->ports[port].pm |= PCR_MATRIX(BIT(MT7530_CPU_PORT));
|
||||
+ if (dsa_port_is_user(dp)) {
|
||||
+ struct dsa_port *cpu_dp = dp->cpu_dp;
|
||||
+
|
||||
+ priv->ports[port].pm |= PCR_MATRIX(BIT(cpu_dp->index));
|
||||
+ }
|
||||
priv->ports[port].enable = true;
|
||||
mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
|
||||
priv->ports[port].pm);
|
||||
@@ -1190,7 +1195,8 @@ mt7530_port_bridge_join(struct dsa_switch *ds, int port,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
|
||||
- u32 port_bitmap = BIT(MT7530_CPU_PORT);
|
||||
+ struct dsa_port *cpu_dp = dp->cpu_dp;
|
||||
+ u32 port_bitmap = BIT(cpu_dp->index);
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
|
||||
mutex_lock(&priv->reg_mutex);
|
||||
@@ -1267,9 +1273,12 @@ mt7530_port_set_vlan_unaware(struct dsa_switch *ds, int port)
|
||||
* the CPU port get out of VLAN filtering mode.
|
||||
*/
|
||||
if (all_user_ports_removed) {
|
||||
- mt7530_write(priv, MT7530_PCR_P(MT7530_CPU_PORT),
|
||||
+ struct dsa_port *dp = dsa_to_port(ds, port);
|
||||
+ struct dsa_port *cpu_dp = dp->cpu_dp;
|
||||
+
|
||||
+ mt7530_write(priv, MT7530_PCR_P(cpu_dp->index),
|
||||
PCR_MATRIX(dsa_user_ports(priv->ds)));
|
||||
- mt7530_write(priv, MT7530_PVC_P(MT7530_CPU_PORT), PORT_SPEC_TAG
|
||||
+ mt7530_write(priv, MT7530_PVC_P(cpu_dp->index), PORT_SPEC_TAG
|
||||
| PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
|
||||
}
|
||||
}
|
||||
@@ -1307,6 +1316,7 @@ mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
|
||||
struct dsa_bridge bridge)
|
||||
{
|
||||
struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
|
||||
+ struct dsa_port *cpu_dp = dp->cpu_dp;
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
|
||||
mutex_lock(&priv->reg_mutex);
|
||||
@@ -1335,8 +1345,8 @@ mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
|
||||
*/
|
||||
if (priv->ports[port].enable)
|
||||
mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
|
||||
- PCR_MATRIX(BIT(MT7530_CPU_PORT)));
|
||||
- priv->ports[port].pm = PCR_MATRIX(BIT(MT7530_CPU_PORT));
|
||||
+ PCR_MATRIX(BIT(cpu_dp->index)));
|
||||
+ priv->ports[port].pm = PCR_MATRIX(BIT(cpu_dp->index));
|
||||
|
||||
/* When a port is removed from the bridge, the port would be set up
|
||||
* back to the default as is at initial boot which is a VLAN-unaware
|
||||
@@ -1503,6 +1513,9 @@ static int
|
||||
mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
+ struct dsa_port *dp = dsa_to_port(ds, port);
|
||||
+ struct dsa_port *cpu_dp = dp->cpu_dp;
|
||||
+
|
||||
if (vlan_filtering) {
|
||||
/* The port is being kept as VLAN-unaware port when bridge is
|
||||
* set up with vlan_filtering not being set, Otherwise, the
|
||||
@@ -1510,7 +1523,7 @@ mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
|
||||
* for becoming a VLAN-aware port.
|
||||
*/
|
||||
mt7530_port_set_vlan_aware(ds, port);
|
||||
- mt7530_port_set_vlan_aware(ds, MT7530_CPU_PORT);
|
||||
+ mt7530_port_set_vlan_aware(ds, cpu_dp->index);
|
||||
} else {
|
||||
mt7530_port_set_vlan_unaware(ds, port);
|
||||
}
|
||||
diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h
|
||||
index 91508e2feef9..5895bcfc0f7d 100644
|
||||
--- a/drivers/net/dsa/mt7530.h
|
||||
+++ b/drivers/net/dsa/mt7530.h
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#define MT7530_NUM_PORTS 7
|
||||
#define MT7530_NUM_PHYS 5
|
||||
-#define MT7530_CPU_PORT 6
|
||||
#define MT7530_NUM_FDB_RECORDS 2048
|
||||
#define MT7530_ALL_MEMBERS 0xff
|
||||
|
||||
@ -0,0 +1,187 @@
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
|
||||
index 4eaeb430c83a..7efd12312354 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
|
||||
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
-#include <linux/dma-iommu.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_graph.h>
|
||||
@@ -34,7 +33,6 @@
|
||||
#define DRIVER_MAJOR 1
|
||||
#define DRIVER_MINOR 0
|
||||
|
||||
-static bool is_support_iommu = true;
|
||||
static const struct drm_driver rockchip_drm_driver;
|
||||
|
||||
/*
|
||||
@@ -48,7 +46,7 @@ int rockchip_drm_dma_attach_device(struct drm_device *drm_dev,
|
||||
struct rockchip_drm_private *private = drm_dev->dev_private;
|
||||
int ret;
|
||||
|
||||
- if (!is_support_iommu)
|
||||
+ if (!private->domain)
|
||||
return 0;
|
||||
|
||||
ret = iommu_attach_device(private->domain, dev);
|
||||
@@ -64,12 +62,22 @@ void rockchip_drm_dma_detach_device(struct drm_device *drm_dev,
|
||||
struct device *dev)
|
||||
{
|
||||
struct rockchip_drm_private *private = drm_dev->dev_private;
|
||||
- struct iommu_domain *domain = private->domain;
|
||||
|
||||
- if (!is_support_iommu)
|
||||
+ if (!private->domain)
|
||||
return;
|
||||
|
||||
- iommu_detach_device(domain, dev);
|
||||
+ iommu_detach_device(private->domain, dev);
|
||||
+}
|
||||
+
|
||||
+void rockchip_drm_dma_init_device(struct drm_device *drm_dev,
|
||||
+ struct device *dev)
|
||||
+{
|
||||
+ struct rockchip_drm_private *private = drm_dev->dev_private;
|
||||
+
|
||||
+ if (!device_iommu_mapped(dev))
|
||||
+ private->iommu_dev = ERR_PTR(-ENODEV);
|
||||
+ else if (!private->iommu_dev)
|
||||
+ private->iommu_dev = dev;
|
||||
}
|
||||
|
||||
static int rockchip_drm_init_iommu(struct drm_device *drm_dev)
|
||||
@@ -78,10 +86,10 @@ static int rockchip_drm_init_iommu(struct drm_device *drm_dev)
|
||||
struct iommu_domain_geometry *geometry;
|
||||
u64 start, end;
|
||||
|
||||
- if (!is_support_iommu)
|
||||
+ if (IS_ERR_OR_NULL(private->iommu_dev))
|
||||
return 0;
|
||||
|
||||
- private->domain = iommu_domain_alloc(&platform_bus_type);
|
||||
+ private->domain = iommu_domain_alloc(private->iommu_dev->bus);
|
||||
if (!private->domain)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -101,7 +109,7 @@ static void rockchip_iommu_cleanup(struct drm_device *drm_dev)
|
||||
{
|
||||
struct rockchip_drm_private *private = drm_dev->dev_private;
|
||||
|
||||
- if (!is_support_iommu)
|
||||
+ if (!private->domain)
|
||||
return;
|
||||
|
||||
drm_mm_takedown(&private->mm);
|
||||
@@ -137,24 +145,24 @@ static int rockchip_drm_bind(struct device *dev)
|
||||
|
||||
drm_dev->dev_private = private;
|
||||
|
||||
- ret = rockchip_drm_init_iommu(drm_dev);
|
||||
- if (ret)
|
||||
- goto err_free;
|
||||
-
|
||||
ret = drmm_mode_config_init(drm_dev);
|
||||
if (ret)
|
||||
- goto err_iommu_cleanup;
|
||||
+ goto err_free;
|
||||
|
||||
rockchip_drm_mode_config_init(drm_dev);
|
||||
|
||||
/* Try to bind all sub drivers. */
|
||||
ret = component_bind_all(dev, drm_dev);
|
||||
if (ret)
|
||||
- goto err_iommu_cleanup;
|
||||
+ goto err_free;
|
||||
+
|
||||
+ ret = rockchip_drm_init_iommu(drm_dev);
|
||||
+ if (ret)
|
||||
+ goto err_unbind_all;
|
||||
|
||||
ret = drm_vblank_init(drm_dev, drm_dev->mode_config.num_crtc);
|
||||
if (ret)
|
||||
- goto err_unbind_all;
|
||||
+ goto err_iommu_cleanup;
|
||||
|
||||
drm_mode_config_reset(drm_dev);
|
||||
|
||||
@@ -170,10 +178,10 @@ static int rockchip_drm_bind(struct device *dev)
|
||||
return 0;
|
||||
err_kms_helper_poll_fini:
|
||||
drm_kms_helper_poll_fini(drm_dev);
|
||||
-err_unbind_all:
|
||||
- component_unbind_all(dev, drm_dev);
|
||||
err_iommu_cleanup:
|
||||
rockchip_iommu_cleanup(drm_dev);
|
||||
+err_unbind_all:
|
||||
+ component_unbind_all(dev, drm_dev);
|
||||
err_free:
|
||||
drm_dev_put(drm_dev);
|
||||
return ret;
|
||||
@@ -342,8 +350,6 @@ static int rockchip_drm_platform_of_probe(struct device *dev)
|
||||
return -ENODEV;
|
||||
|
||||
for (i = 0;; i++) {
|
||||
- struct device_node *iommu;
|
||||
-
|
||||
port = of_parse_phandle(np, "ports", i);
|
||||
if (!port)
|
||||
break;
|
||||
@@ -353,21 +359,7 @@ static int rockchip_drm_platform_of_probe(struct device *dev)
|
||||
continue;
|
||||
}
|
||||
|
||||
- iommu = of_parse_phandle(port->parent, "iommus", 0);
|
||||
- if (!iommu || !of_device_is_available(iommu)) {
|
||||
- DRM_DEV_DEBUG(dev,
|
||||
- "no iommu attached for %pOF, using non-iommu buffers\n",
|
||||
- port->parent);
|
||||
- /*
|
||||
- * if there is a crtc not support iommu, force set all
|
||||
- * crtc use non-iommu buffer.
|
||||
- */
|
||||
- is_support_iommu = false;
|
||||
- }
|
||||
-
|
||||
found = true;
|
||||
-
|
||||
- of_node_put(iommu);
|
||||
of_node_put(port);
|
||||
}
|
||||
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
|
||||
index 143a48330f84..008c44aef400 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
|
||||
@@ -44,6 +44,7 @@ struct rockchip_crtc_state {
|
||||
*/
|
||||
struct rockchip_drm_private {
|
||||
struct iommu_domain *domain;
|
||||
+ struct device *iommu_dev;
|
||||
struct mutex mm_lock;
|
||||
struct drm_mm mm;
|
||||
};
|
||||
@@ -52,6 +53,8 @@ int rockchip_drm_dma_attach_device(struct drm_device *drm_dev,
|
||||
struct device *dev);
|
||||
void rockchip_drm_dma_detach_device(struct drm_device *drm_dev,
|
||||
struct device *dev);
|
||||
+void rockchip_drm_dma_init_device(struct drm_device *drm_dev,
|
||||
+ struct device *dev);
|
||||
int rockchip_drm_wait_vact_end(struct drm_crtc *crtc, unsigned int mstimeout);
|
||||
|
||||
int rockchip_drm_endpoint_is_subdriver(struct device_node *ep);
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
|
||||
index 3e8d9e2d1b67..4c38c53e9f65 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
|
||||
@@ -2175,6 +2175,8 @@ static int vop_bind(struct device *dev, struct device *master, void *data)
|
||||
}
|
||||
}
|
||||
|
||||
+ rockchip_drm_dma_init_device(drm_dev, dev);
|
||||
+
|
||||
return 0;
|
||||
|
||||
err_disable_pm_runtime:
|
||||
@ -0,0 +1,28 @@
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
index 2700fb18a3bc..0950f9659bb4 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
@@ -225,6 +225,7 @@ regulator-state-mem {
|
||||
|
||||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-name = "vdd_gpu";
|
||||
+ regulator-always-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
@@ -274,6 +275,7 @@ regulator-state-mem {
|
||||
|
||||
vdda0v9_image: LDO_REG1 {
|
||||
regulator-name = "vdda0v9_image";
|
||||
+ regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
|
||||
@@ -369,6 +371,7 @@ regulator-state-mem {
|
||||
|
||||
vcca1v8_image: LDO_REG9 {
|
||||
regulator-name = "vcca1v8_image";
|
||||
+ regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
@ -0,0 +1,76 @@
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
index 0950f9659bb4..cc3591251bab 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3568.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -54,6 +55,17 @@ dc_12v: dc-12v {
|
||||
regulator-max-microvolt = <12000000>;
|
||||
};
|
||||
|
||||
+ hdmi-con {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
vcc3v3_sys: vcc3v3-sys {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_sys";
|
||||
@@ -184,6 +196,24 @@ &gmac1m1_rgmii_clk
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&hdmi {
|
||||
+ avdd-0v9-supply = <&vdda0v9_image>;
|
||||
+ avdd-1v8-supply = <&vcca1v8_image>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi_in {
|
||||
+ hdmi_in_vp0: endpoint {
|
||||
+ remote-endpoint = <&vp0_out_hdmi>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi_out {
|
||||
+ hdmi_out_con: endpoint {
|
||||
+ remote-endpoint = <&hdmi_con_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
|
||||
@@ -600,3 +630,20 @@ &usb2phy0_otg {
|
||||
phy-supply = <&vcc5v0_usb_otg>;
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&vop {
|
||||
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
|
||||
+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vp0 {
|
||||
+ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
+ remote-endpoint = <&hdmi_in_vp0>;
|
||||
+ };
|
||||
+};
|
||||
@ -0,0 +1,25 @@
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
index cc3591251bab..10f68d054f76 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
@@ -196,6 +196,11 @@ &gmac1m1_rgmii_clk
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&hdmi {
|
||||
avdd-0v9-supply = <&vdda0v9_image>;
|
||||
avdd-1v8-supply = <&vcca1v8_image>;
|
||||
@@ -566,6 +571,8 @@ &spi3 {
|
||||
};
|
||||
|
||||
&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <1>;
|
||||
+ rockchip,hw-tshut-polarity = <0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
292
patch/kernel/archive/media-5.18/05-v95-rk3568-bpi-r2-pro.patch
Normal file
292
patch/kernel/archive/media-5.18/05-v95-rk3568-bpi-r2-pro.patch
Normal file
@ -0,0 +1,292 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/pwm/pwm.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
@@ -17,6 +18,7 @@
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac0;
|
||||
+ ethernet1 = &gmac1;
|
||||
mmc0 = &sdmmc0;
|
||||
mmc1 = &sdhci;
|
||||
};
|
||||
@@ -52,6 +54,14 @@
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <12000000>;
|
||||
regulator-max-microvolt = <12000000>;
|
||||
+ };
|
||||
+
|
||||
+ fan: gpio_fan {
|
||||
+ compatible = "gpio-fan";
|
||||
+ gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
|
||||
+ gpio-fan,speed-map = <0 0
|
||||
+ 4500 1>;
|
||||
+ #cooling-cells = <2>;
|
||||
};
|
||||
|
||||
hdmi-con {
|
||||
@@ -75,9 +85,19 @@
|
||||
vin-supply = <&dc_12v>;
|
||||
};
|
||||
|
||||
- vcc5v0_sys: vcc5v0-sys {
|
||||
+ vcc5v0_sys: vcc5v0_sys {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&dc_12v>;
|
||||
+ };
|
||||
+
|
||||
+ vbus: vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vbus";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
@@ -118,6 +138,28 @@
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_usb>;
|
||||
};
|
||||
+
|
||||
+ rk809-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,name = "Analog RK809";
|
||||
+ simple-audio-card,mclk-fs = <256>;
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s1_8ch>;
|
||||
+ };
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&rk809>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk_headset: rk-headset {
|
||||
+ compatible = "rockchip_headset";
|
||||
+ headset_gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hp_det>;
|
||||
+ io-channels = <&saradc 2>; //HP_HOOK pin
|
||||
+ };
|
||||
};
|
||||
|
||||
&combphy0 {
|
||||
@@ -133,13 +175,45 @@
|
||||
&combphy2 {
|
||||
/* used for SATA */
|
||||
status = "okay";
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu_thermal {
|
||||
+ trips {
|
||||
+ cpu_hot: cpu_hot {
|
||||
+ temperature = <55000>;
|
||||
+ hysteresis = <2000>;
|
||||
+ type = "active";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map1 {
|
||||
+ trip = <&cpu_hot>;
|
||||
+ cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
|
||||
assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
|
||||
clock_in_out = "input";
|
||||
- phy-handle = <&rgmii_phy0>;
|
||||
phy-mode = "rgmii";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac0_miim
|
||||
@@ -151,8 +225,38 @@
|
||||
snps,reset-active-low;
|
||||
/* Reset time is 20ms, 100ms for rtl8211f */
|
||||
snps,reset-delays-us = <0 20000 100000>;
|
||||
+ tx_delay = <0x4f>;
|
||||
+ rx_delay = <0x0f>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ pause;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&gmac1 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>;
|
||||
+ clock_in_out = "output";
|
||||
+ phy-handle = <&rgmii_phy1>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gmac1m1_miim
|
||||
+ &gmac1m1_tx_bus2
|
||||
+ &gmac1m1_rx_bus2
|
||||
+ &gmac1m1_rgmii_clk
|
||||
+ &gmac1m1_rgmii_bus>;
|
||||
+
|
||||
+ snps,reset-gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
|
||||
+ snps,reset-active-low;
|
||||
+ /* Reset time is 20ms, 100ms for rtl8211f */
|
||||
+ snps,reset-delays-us = <0 20000 100000>;
|
||||
+
|
||||
tx_delay = <0x3c>;
|
||||
rx_delay = <0x2f>;
|
||||
+
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -179,18 +283,56 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&hdmi_sound {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
+
|
||||
+
|
||||
+ vdd_cpu: regulator@1c {
|
||||
+ compatible = "tcs,tcs4525";
|
||||
+ reg = <0x1c>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ regulator-compatible = "fan53555-reg";
|
||||
+ regulator-name = "vdd_cpu";
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1390000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
|
||||
rk809: pmic@20 {
|
||||
compatible = "rockchip,rk809";
|
||||
reg = <0x20>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ assigned-clocks = <&cru I2S1_MCLKOUT>, <&cru I2S1_MCLK_TX_IOE>;
|
||||
+ assigned-clock-rates = <12288000>;
|
||||
+ assigned-clock-parents = <&cru I2S1_MCLKOUT_TX>, <&cru I2S1_MCLKOUT_TX>;
|
||||
#clock-cells = <1>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pmic_int>;
|
||||
+ clock-names = "mclk";
|
||||
+ clocks = <&cru I2S1_MCLKOUT>;
|
||||
+ pinctrl-names = "default", "pmic-sleep",
|
||||
+ "pmic-power-off", "pmic-reset";
|
||||
+ pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
|
||||
+
|
||||
rockchip,system-power-controller;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ clock-output-names = "rk808-clkout1", "rk808-clkout2";
|
||||
+ //fb-inner-reg-idxs = <2>;
|
||||
+ /* 1: rst regs (default in codes), 0: rst the pmic */
|
||||
+ pmic-reset-func = <0>;
|
||||
+ /* not save the PMIC_POWER_EN register in uboot */
|
||||
+ not-save-power-en = <1>;
|
||||
+
|
||||
vcc1-supply = <&vcc3v3_sys>;
|
||||
vcc2-supply = <&vcc3v3_sys>;
|
||||
vcc3-supply = <&vcc3v3_sys>;
|
||||
@@ -394,6 +536,10 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ codec {
|
||||
+ mic-in-differential;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -402,8 +548,24 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
-&mdio0 {
|
||||
- rgmii_phy0: ethernet-phy@0 {
|
||||
+&i2s0_8ch {
|
||||
+ /* hdmi sound */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s1_8ch {
|
||||
+ /* headphone */
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2s1m0_sclktx
|
||||
+ &i2s1m0_lrcktx
|
||||
+ &i2s1m0_sdi0
|
||||
+ &i2s1m0_sdo0>;
|
||||
+ rockchip,trcm-sync-tx-only;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mdio1 {
|
||||
+ rgmii_phy1: ethernet-phy@0 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0x0>;
|
||||
};
|
||||
@@ -433,6 +595,12 @@
|
||||
|
||||
vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
|
||||
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ headphone {
|
||||
+ hp_det: hp-det {
|
||||
+ rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -442,9 +610,9 @@
|
||||
pmuio2-supply = <&vcc3v3_pmu>;
|
||||
vccio1-supply = <&vccio_acodec>;
|
||||
vccio3-supply = <&vccio_sd>;
|
||||
- vccio4-supply = <&vcc_1v8>;
|
||||
+ vccio4-supply = <&vcc_3v3>;
|
||||
vccio5-supply = <&vcc_3v3>;
|
||||
- vccio6-supply = <&vcc_3v3>;
|
||||
+ vccio6-supply = <&vcc_1v8>;
|
||||
vccio7-supply = <&vcc_3v3>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
28
patch/kernel/archive/media-5.18/06-usb-dwc3-fix.patch
Executable file
28
patch/kernel/archive/media-5.18/06-usb-dwc3-fix.patch
Executable file
@ -0,0 +1,28 @@
|
||||
--- a/drivers/usb/dwc3/core.c
|
||||
+++ b/drivers/usb/dwc3/core.c
|
||||
@@ -274,8 +274,7 @@
|
||||
|
||||
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
|
||||
reg |= DWC3_DCTL_CSFTRST;
|
||||
- reg &= ~DWC3_DCTL_RUN_STOP;
|
||||
- dwc3_gadget_dctl_write_safe(dwc, reg);
|
||||
+ dwc3_writel(dwc->regs, DWC3_DCTL, reg);
|
||||
|
||||
/*
|
||||
* For DWC_usb31 controller 1.90a and later, the DCTL.CSFRST bit
|
||||
@@ -1378,10 +1377,10 @@
|
||||
u8 lpm_nyet_threshold;
|
||||
u8 tx_de_emphasis;
|
||||
u8 hird_threshold;
|
||||
- u8 rx_thr_num_pkt_prd = 0;
|
||||
- u8 rx_max_burst_prd = 0;
|
||||
- u8 tx_thr_num_pkt_prd = 0;
|
||||
- u8 tx_max_burst_prd = 0;
|
||||
+ u8 rx_thr_num_pkt_prd;
|
||||
+ u8 rx_max_burst_prd;
|
||||
+ u8 tx_thr_num_pkt_prd;
|
||||
+ u8 tx_max_burst_prd;
|
||||
u8 tx_fifo_resize_max_num;
|
||||
const char *usb_psy_name;
|
||||
int ret;
|
||||
|
||||
@ -1,49 +0,0 @@
|
||||
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
|
||||
index 1170b800acdc..5bfd3e88af35 100644
|
||||
--- a/drivers/usb/dwc3/core.c
|
||||
+++ b/drivers/usb/dwc3/core.c
|
||||
@@ -1690,21 +1690,44 @@ static int dwc3_probe(struct platform_device *pdev)
|
||||
/*
|
||||
* Clocks are optional, but new DT platforms should support all
|
||||
* clocks as required by the DT-binding.
|
||||
+ * Some devices have different clock names in legacy device trees,
|
||||
+ * check for them to retain backwards compatibility.
|
||||
*/
|
||||
dwc->bus_clk = devm_clk_get_optional(dev, "bus_early");
|
||||
if (IS_ERR(dwc->bus_clk))
|
||||
return dev_err_probe(dev, PTR_ERR(dwc->bus_clk),
|
||||
"could not get bus clock\n");
|
||||
|
||||
+ if (dwc->bus_clk == NULL) {
|
||||
+ dwc->bus_clk = devm_clk_get_optional(dev, "bus_clk");
|
||||
+ if (IS_ERR(dwc->bus_clk))
|
||||
+ return dev_err_probe(dev, PTR_ERR(dwc->bus_clk),
|
||||
+ "could not get bus clock\n");
|
||||
+ }
|
||||
+
|
||||
dwc->ref_clk = devm_clk_get_optional(dev, "ref");
|
||||
if (IS_ERR(dwc->ref_clk))
|
||||
return dev_err_probe(dev, PTR_ERR(dwc->ref_clk),
|
||||
"could not get ref clock\n");
|
||||
|
||||
+ if (dwc->ref_clk == NULL) {
|
||||
+ dwc->ref_clk = devm_clk_get_optional(dev, "ref_clk");
|
||||
+ if (IS_ERR(dwc->ref_clk))
|
||||
+ return dev_err_probe(dev, PTR_ERR(dwc->ref_clk),
|
||||
+ "could not get ref clock\n");
|
||||
+ }
|
||||
+
|
||||
dwc->susp_clk = devm_clk_get_optional(dev, "suspend");
|
||||
if (IS_ERR(dwc->susp_clk))
|
||||
return dev_err_probe(dev, PTR_ERR(dwc->susp_clk),
|
||||
"could not get suspend clock\n");
|
||||
+
|
||||
+ if (dwc->susp_clk == NULL) {
|
||||
+ dwc->susp_clk = devm_clk_get_optional(dev, "suspend_clk");
|
||||
+ if (IS_ERR(dwc->susp_clk))
|
||||
+ return dev_err_probe(dev, PTR_ERR(dwc->susp_clk),
|
||||
+ "could not get suspend clock\n");
|
||||
+ }
|
||||
}
|
||||
|
||||
ret = reset_control_deassert(dwc->reset);
|
||||
Loading…
Reference in New Issue
Block a user