aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt13
-rw-r--r--arch/arm/boot/dts/hisi-x5hd2.dtsi4
-rw-r--r--drivers/net/ethernet/hisilicon/hix5hd2_gmac.c13
3 files changed, 17 insertions, 13 deletions
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
index 063c02da018a..eea73adc678f 100644
--- a/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
+++ b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
@@ -2,11 +2,14 @@ Hisilicon hix5hd2 gmac controller
2 2
3Required properties: 3Required properties:
4- compatible: should contain one of the following SoC strings: 4- compatible: should contain one of the following SoC strings:
5 * "hisilicon,hix5hd2-gemac" 5 * "hisilicon,hix5hd2-gmac"
6 * "hisilicon,hi3798cv200-gemac" 6 * "hisilicon,hi3798cv200-gmac"
7 * "hisilicon,hi3516a-gmac"
7 and one of the following version string: 8 and one of the following version string:
8 * "hisilicon,hisi-gemac-v1" 9 * "hisilicon,hisi-gmac-v1"
9 * "hisilicon,hisi-gemac-v2" 10 * "hisilicon,hisi-gmac-v2"
11 The version v1 includes SoCs hix5hd2.
12 The version v2 includes SoCs hi3798cv200, hi3516a.
10- reg: specifies base physical address(s) and size of the device registers. 13- reg: specifies base physical address(s) and size of the device registers.
11 The first region is the MAC register base and size. 14 The first region is the MAC register base and size.
12 The second region is external interface control register. 15 The second region is external interface control register.
@@ -35,7 +38,7 @@ Required properties:
35 38
36Example: 39Example:
37 gmac0: ethernet@f9840000 { 40 gmac0: ethernet@f9840000 {
38 compatible = "hisilicon,hi3798cv200-gemac", "hisilicon,hisi-gemac-v2"; 41 compatible = "hisilicon,hi3798cv200-gmac", "hisilicon,hisi-gmac-v2";
39 reg = <0xf9840000 0x1000>,<0xf984300c 0x4>; 42 reg = <0xf9840000 0x1000>,<0xf984300c 0x4>;
40 interrupts = <0 71 4>; 43 interrupts = <0 71 4>;
41 #address-cells = <1>; 44 #address-cells = <1>;
diff --git a/arch/arm/boot/dts/hisi-x5hd2.dtsi b/arch/arm/boot/dts/hisi-x5hd2.dtsi
index c02e092fad8b..6c712a97e1fe 100644
--- a/arch/arm/boot/dts/hisi-x5hd2.dtsi
+++ b/arch/arm/boot/dts/hisi-x5hd2.dtsi
@@ -438,7 +438,7 @@
438 }; 438 };
439 439
440 gmac0: ethernet@1840000 { 440 gmac0: ethernet@1840000 {
441 compatible = "hisilicon,hix5hd2-gemac", "hisilicon,hisi-gemac-v1"; 441 compatible = "hisilicon,hix5hd2-gmac", "hisilicon,hisi-gmac-v1";
442 reg = <0x1840000 0x1000>,<0x184300c 0x4>; 442 reg = <0x1840000 0x1000>,<0x184300c 0x4>;
443 interrupts = <0 71 4>; 443 interrupts = <0 71 4>;
444 clocks = <&clock HIX5HD2_MAC0_CLK>; 444 clocks = <&clock HIX5HD2_MAC0_CLK>;
@@ -447,7 +447,7 @@
447 }; 447 };
448 448
449 gmac1: ethernet@1841000 { 449 gmac1: ethernet@1841000 {
450 compatible = "hisilicon,hix5hd2-gemac", "hisilicon,hisi-gemac-v1"; 450 compatible = "hisilicon,hix5hd2-gmac", "hisilicon,hisi-gmac-v1";
451 reg = <0x1841000 0x1000>,<0x1843010 0x4>; 451 reg = <0x1841000 0x1000>,<0x1843010 0x4>;
452 interrupts = <0 72 4>; 452 interrupts = <0 72 4>;
453 clocks = <&clock HIX5HD2_MAC1_CLK>; 453 clocks = <&clock HIX5HD2_MAC1_CLK>;
diff --git a/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c b/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
index ee7e9ce2f5b3..418ca1f3774a 100644
--- a/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
+++ b/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
@@ -1316,10 +1316,11 @@ static int hix5hd2_dev_remove(struct platform_device *pdev)
1316} 1316}
1317 1317
1318static const struct of_device_id hix5hd2_of_match[] = { 1318static const struct of_device_id hix5hd2_of_match[] = {
1319 { .compatible = "hisilicon,hisi-gemac-v1", .data = (void *)GEMAC_V1 }, 1319 { .compatible = "hisilicon,hisi-gmac-v1", .data = (void *)GEMAC_V1 },
1320 { .compatible = "hisilicon,hisi-gemac-v2", .data = (void *)GEMAC_V2 }, 1320 { .compatible = "hisilicon,hisi-gmac-v2", .data = (void *)GEMAC_V2 },
1321 { .compatible = "hisilicon,hix5hd2-gemac", .data = (void *)GEMAC_V1 }, 1321 { .compatible = "hisilicon,hix5hd2-gmac", .data = (void *)GEMAC_V1 },
1322 { .compatible = "hisilicon,hi3798cv200-gemac", .data = (void *)GEMAC_V2 }, 1322 { .compatible = "hisilicon,hi3798cv200-gmac", .data = (void *)GEMAC_V2 },
1323 { .compatible = "hisilicon,hi3516a-gmac", .data = (void *)GEMAC_V2 },
1323 {}, 1324 {},
1324}; 1325};
1325 1326
@@ -1327,7 +1328,7 @@ MODULE_DEVICE_TABLE(of, hix5hd2_of_match);
1327 1328
1328static struct platform_driver hix5hd2_dev_driver = { 1329static struct platform_driver hix5hd2_dev_driver = {
1329 .driver = { 1330 .driver = {
1330 .name = "hisi-gemac", 1331 .name = "hisi-gmac",
1331 .of_match_table = hix5hd2_of_match, 1332 .of_match_table = hix5hd2_of_match,
1332 }, 1333 },
1333 .probe = hix5hd2_dev_probe, 1334 .probe = hix5hd2_dev_probe,
@@ -1338,4 +1339,4 @@ module_platform_driver(hix5hd2_dev_driver);
1338 1339
1339MODULE_DESCRIPTION("HISILICON Gigabit Ethernet MAC driver"); 1340MODULE_DESCRIPTION("HISILICON Gigabit Ethernet MAC driver");
1340MODULE_LICENSE("GPL v2"); 1341MODULE_LICENSE("GPL v2");
1341MODULE_ALIAS("platform:hisi-gemac"); 1342MODULE_ALIAS("platform:hisi-gmac");