Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
This commit is contained in:
commit
9b735afe3e
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mbedtls
|
||||
PKG_VERSION:=2.16.9
|
||||
PKG_VERSION:=2.16.10
|
||||
PKG_RELEASE:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=fc17ff7d8c11d08f23ae2800a18269408ad2c24ea6bb8b9363e41a01c2425697
|
||||
PKG_HASH:=96257bb03b30300b2f35f861ffe204ed957e9fd0329d80646fe57fc49f589b29
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
|
||||
@ -144,7 +144,7 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
|
||||
@@ -1779,7 +1779,7 @@
|
||||
@@ -1796,7 +1796,7 @@
|
||||
*
|
||||
* Comment this to disable run-time checking and save ROM space
|
||||
*/
|
||||
@ -153,7 +153,7 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
|
||||
@@ -2109,7 +2109,7 @@
|
||||
@@ -2126,7 +2126,7 @@
|
||||
* MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
|
||||
* MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
|
||||
*/
|
||||
@ -162,7 +162,7 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_ARIA_C
|
||||
@@ -2175,7 +2175,7 @@
|
||||
@@ -2192,7 +2192,7 @@
|
||||
* This module enables the AES-CCM ciphersuites, if other requisites are
|
||||
* enabled as well.
|
||||
*/
|
||||
@ -171,7 +171,7 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_CERTS_C
|
||||
@@ -2187,7 +2187,7 @@
|
||||
@@ -2204,7 +2204,7 @@
|
||||
*
|
||||
* This module is used for testing (ssl_client/server).
|
||||
*/
|
||||
@ -180,7 +180,7 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_CHACHA20_C
|
||||
@@ -2295,7 +2295,7 @@
|
||||
@@ -2312,7 +2312,7 @@
|
||||
* \warning DES is considered a weak cipher and its use constitutes a
|
||||
* security risk. We recommend considering stronger ciphers instead.
|
||||
*/
|
||||
@ -189,7 +189,7 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_DHM_C
|
||||
@@ -2458,7 +2458,7 @@
|
||||
@@ -2475,7 +2475,7 @@
|
||||
* This module adds support for the Hashed Message Authentication Code
|
||||
* (HMAC)-based key derivation function (HKDF).
|
||||
*/
|
||||
@ -198,7 +198,7 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_HMAC_DRBG_C
|
||||
@@ -2768,7 +2768,7 @@
|
||||
@@ -2785,7 +2785,7 @@
|
||||
*
|
||||
* This module enables abstraction of common (libc) functions.
|
||||
*/
|
||||
@ -207,7 +207,7 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_POLY1305_C
|
||||
@@ -2789,7 +2789,7 @@
|
||||
@@ -2806,7 +2806,7 @@
|
||||
* Caller: library/md.c
|
||||
*
|
||||
*/
|
||||
@ -216,7 +216,7 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_RSA_C
|
||||
@@ -2896,7 +2896,7 @@
|
||||
@@ -2913,7 +2913,7 @@
|
||||
*
|
||||
* Requires: MBEDTLS_CIPHER_C
|
||||
*/
|
||||
@ -225,7 +225,7 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_CLI_C
|
||||
@@ -2996,7 +2996,7 @@
|
||||
@@ -3013,7 +3013,7 @@
|
||||
*
|
||||
* This module provides run-time version information.
|
||||
*/
|
||||
@ -234,7 +234,7 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_X509_USE_C
|
||||
@@ -3106,7 +3106,7 @@
|
||||
@@ -3123,7 +3123,7 @@
|
||||
* Module: library/xtea.c
|
||||
* Caller:
|
||||
*/
|
||||
|
||||
@ -54,6 +54,7 @@ Print manifest:
|
||||
|
||||
make manifest PROFILE="<profilename>" # override the default target profile
|
||||
make manifest PACKAGES="<pkg1> [<pkg2> [<pkg3> ...]]" # include extra packages
|
||||
make manifest STRIP_ABI=1 # remove ABI version from printed package names
|
||||
|
||||
endef
|
||||
$(eval $(call shexport,Helptext))
|
||||
@ -129,7 +130,7 @@ _call_manifest: FORCE
|
||||
mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(DL_DIR)
|
||||
$(MAKE) package_reload >/dev/null
|
||||
$(MAKE) package_install >/dev/null
|
||||
$(OPKG) list-installed
|
||||
$(OPKG) list-installed $(if $(STRIP_ABI),--strip-abi)
|
||||
|
||||
package_index: FORCE
|
||||
@echo >&2
|
||||
|
||||
@ -4,7 +4,7 @@ CONFIG_ARCH_MMAP_RND_BITS_MAX=15
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_B53=y
|
||||
# CONFIG_B53_MDIO_DRIVER is not set
|
||||
CONFIG_B53_MDIO_DRIVER=y
|
||||
CONFIG_B53_MMAP_DRIVER=y
|
||||
# CONFIG_B53_SERDES is not set
|
||||
CONFIG_B53_SPI_DRIVER=y
|
||||
|
||||
@ -216,6 +216,22 @@
|
||||
};
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@4 {
|
||||
reg = <4>;
|
||||
label = "extsw";
|
||||
|
||||
phy-mode = "rgmii";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -8,6 +8,9 @@ case "$(board_name)" in
|
||||
comtrend,vr-3032u)
|
||||
ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
|
||||
;;
|
||||
netgear,dgnd3700-v2)
|
||||
ucidef_set_interface_lan "extsw"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
From 6d16eadab6db0c1d61e59fee7ed1ecc2d10269be Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Mon, 15 Mar 2021 15:14:23 +0100
|
||||
Subject: [PATCH] net: dsa: b53: spi: allow device tree probing
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add missing of_match_table to allow device tree probing.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_spi.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_spi.c
|
||||
+++ b/drivers/net/dsa/b53/b53_spi.c
|
||||
@@ -324,9 +324,22 @@ static int b53_spi_remove(struct spi_dev
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static const struct of_device_id b53_spi_of_match[] = {
|
||||
+ { .compatible = "brcm,bcm5325" },
|
||||
+ { .compatible = "brcm,bcm5365" },
|
||||
+ { .compatible = "brcm,bcm5395" },
|
||||
+ { .compatible = "brcm,bcm5397" },
|
||||
+ { .compatible = "brcm,bcm5398" },
|
||||
+ { .compatible = "brcm,bcm53115" },
|
||||
+ { .compatible = "brcm,bcm53125" },
|
||||
+ { .compatible = "brcm,bcm53128" },
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+
|
||||
static struct spi_driver b53_spi_driver = {
|
||||
.driver = {
|
||||
.name = "b53-switch",
|
||||
+ .of_match_table = b53_spi_of_match,
|
||||
},
|
||||
.probe = b53_spi_probe,
|
||||
.remove = b53_spi_remove,
|
||||
@ -0,0 +1,96 @@
|
||||
From da6557edb9f3f4513b01d9a20a36c2fbc31810a1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Mon, 15 Mar 2021 16:45:27 +0100
|
||||
Subject: [PATCH 1/2] dt-bindings: net: Add bcm6368-mdio-mux bindings
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add documentations for bcm6368 mdio mux driver.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
.../bindings/net/brcm,bcm6368-mdio-mux.yaml | 76 +++++++++++++++++++
|
||||
1 file changed, 76 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml
|
||||
@@ -0,0 +1,76 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
+%YAML 1.2
|
||||
+---
|
||||
+$id: http://devicetree.org/schemas/net/brcm,bcm6368-mdio-mux.yaml#
|
||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
+
|
||||
+title: Broadcom BCM6368 MDIO bus multiplexer
|
||||
+
|
||||
+maintainers:
|
||||
+ - Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
+
|
||||
+description:
|
||||
+ This MDIO bus multiplexer defines buses that could be internal as well as
|
||||
+ external to SoCs. When child bus is selected, one needs to select these two
|
||||
+ properties as well to generate desired MDIO transaction on appropriate bus.
|
||||
+
|
||||
+allOf:
|
||||
+ - $ref: "mdio.yaml#"
|
||||
+
|
||||
+properties:
|
||||
+ compatible:
|
||||
+ const: brcm,bcm6368-mdio-mux
|
||||
+
|
||||
+ "#address-cells":
|
||||
+ const: 1
|
||||
+
|
||||
+ "#size-cells":
|
||||
+ const: 0
|
||||
+
|
||||
+ reg:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+required:
|
||||
+ - compatible
|
||||
+ - reg
|
||||
+
|
||||
+patternProperties:
|
||||
+ '^mdio@[0-1]$':
|
||||
+ type: object
|
||||
+ properties:
|
||||
+ reg:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ "#address-cells":
|
||||
+ const: 1
|
||||
+
|
||||
+ "#size-cells":
|
||||
+ const: 0
|
||||
+
|
||||
+ required:
|
||||
+ - reg
|
||||
+ - "#address-cells"
|
||||
+ - "#size-cells"
|
||||
+
|
||||
+unevaluatedProperties: false
|
||||
+
|
||||
+examples:
|
||||
+ - |
|
||||
+ mdio0: mdio@10e000b0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ compatible = "brcm,bcm6368-mdio-mux";
|
||||
+ reg = <0x10e000b0 0x6>;
|
||||
+
|
||||
+ mdio_int: mdio@0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+
|
||||
+ mdio_ext: mdio@1 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
@ -1,7 +1,7 @@
|
||||
From b6ecb2bca2b8ff80ae4b1b15f09dcf071f4ceaf4 Mon Sep 17 00:00:00 2001
|
||||
From e239756717b5c866958823a1609e2ccf268435be Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Mon, 1 Mar 2021 16:42:12 +0100
|
||||
Subject: [PATCH] net: mdio: Add BCM6368 MDIO mux bus controller
|
||||
Date: Mon, 15 Mar 2021 16:45:28 +0100
|
||||
Subject: [PATCH 2/2] net: mdio: Add BCM6368 MDIO mux bus controller
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@ -10,11 +10,12 @@ This controller is present on BCM6318, BCM6328, BCM6362, BCM6368 and BCM63268
|
||||
SoCs.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/mdio/Kconfig | 11 ++
|
||||
drivers/net/mdio/Makefile | 1 +
|
||||
drivers/net/mdio/mdio-mux-bcm6368.c | 179 ++++++++++++++++++++++++++++
|
||||
3 files changed, 191 insertions(+)
|
||||
drivers/net/mdio/mdio-mux-bcm6368.c | 184 ++++++++++++++++++++++++++++
|
||||
3 files changed, 196 insertions(+)
|
||||
create mode 100644 drivers/net/mdio/mdio-mux-bcm6368.c
|
||||
|
||||
--- a/drivers/net/mdio/Kconfig
|
||||
@ -49,7 +50,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
obj-$(CONFIG_MDIO_BUS_MUX_MESON_G12A) += mdio-mux-meson-g12a.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/mdio/mdio-mux-bcm6368.c
|
||||
@@ -0,0 +1,179 @@
|
||||
@@ -0,0 +1,184 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Broadcom BCM6368 mdiomux bus controller driver
|
||||
@ -154,7 +155,8 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
+ if (!res)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ /* Just ioremap, as this MDIO block is usually integrated into an
|
||||
+ /*
|
||||
+ * Just ioremap, as this MDIO block is usually integrated into an
|
||||
+ * Ethernet MAC controller register range
|
||||
+ */
|
||||
+ md->base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
|
||||
@ -229,3 +231,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
+ .remove = bcm6368_mdiomux_remove,
|
||||
+};
|
||||
+module_platform_driver(bcm6368_mdiomux_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Álvaro Fernández Rojas <noltari@gmail.com>");
|
||||
+MODULE_DESCRIPTION("BCM6368 mdiomux bus controller driver");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
@ -0,0 +1,72 @@
|
||||
From 32cf73d8c6485b7b97aca7e377a68436d09b7022 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Sun, 14 Mar 2021 20:03:44 +0100
|
||||
Subject: [PATCH] net: dsa: b53: add support for BCM63xx RGMIIs
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 37 ++++++++++++++++++++++++++++++++
|
||||
1 file changed, 37 insertions(+)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -1140,6 +1140,36 @@ static void b53_force_port_config(struct
|
||||
b53_write8(dev, B53_CTRL_PAGE, off, reg);
|
||||
}
|
||||
|
||||
+static void b53_adjust_63xx_rgmii(struct dsa_switch *ds, int port,
|
||||
+ phy_interface_t interface)
|
||||
+{
|
||||
+ struct b53_device *dev = ds->priv;
|
||||
+ u8 rgmii_ctrl = 0, off;
|
||||
+
|
||||
+ if (port == 8)
|
||||
+ off = B53_RGMII_CTRL_IMP;
|
||||
+ else
|
||||
+ off = B53_RGMII_CTRL_P(port);
|
||||
+
|
||||
+ b53_read8(dev, B53_CTRL_PAGE, off, &rgmii_ctrl);
|
||||
+
|
||||
+ rgmii_ctrl &= ~(RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC);
|
||||
+ if (interface == PHY_INTERFACE_MODE_RGMII_ID)
|
||||
+ rgmii_ctrl |= (RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC);
|
||||
+ else if (interface == PHY_INTERFACE_MODE_RGMII_RXID)
|
||||
+ rgmii_ctrl |= RGMII_CTRL_DLL_RXC;
|
||||
+ else if (interface == PHY_INTERFACE_MODE_RGMII_TXID)
|
||||
+ rgmii_ctrl |= RGMII_CTRL_DLL_TXC;
|
||||
+
|
||||
+ if (port != B53_CPU_PORT)
|
||||
+ rgmii_ctrl |= RGMII_CTRL_ENABLE_GMII;
|
||||
+
|
||||
+ b53_write8(dev, B53_CTRL_PAGE, off, rgmii_ctrl);
|
||||
+
|
||||
+ dev_info(ds->dev, "Configured port %d for %s\n", port,
|
||||
+ phy_modes(interface));
|
||||
+}
|
||||
+
|
||||
static void b53_adjust_link(struct dsa_switch *ds, int port,
|
||||
struct phy_device *phydev)
|
||||
{
|
||||
@@ -1166,6 +1196,9 @@ static void b53_adjust_link(struct dsa_s
|
||||
tx_pause, rx_pause);
|
||||
b53_force_link(dev, port, phydev->link);
|
||||
|
||||
+ if (is63xx(dev))
|
||||
+ b53_adjust_63xx_rgmii(ds, port, phydev->interface);
|
||||
+
|
||||
if (is531x5(dev) && phy_interface_is_rgmii(phydev)) {
|
||||
if (port == 8)
|
||||
off = B53_RGMII_CTRL_IMP;
|
||||
@@ -1358,6 +1391,9 @@ void b53_phylink_mac_link_up(struct dsa_
|
||||
{
|
||||
struct b53_device *dev = ds->priv;
|
||||
|
||||
+ if (is63xx(dev) && port >= 4)
|
||||
+ b53_adjust_63xx_rgmii(ds, port, interface);
|
||||
+
|
||||
if (mode == MLO_AN_PHY)
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user