From 1e14d6eb3daf1b816d838f2a2300238790f11df6 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 7 Apr 2018 22:28:43 +0000 Subject: [PATCH] Add a83t overlays for sid and emac The sun8i-a83t-bananapi-m3-emac overlay technically doesn't match what will be coming from upstream. The tx-delay and rx-delay should be specified in terms of allwinner,tx-delay-ps and allwinner,rx-delay-ps respectively. The values are still technically correct for what we write in if_awg, and support for the new bindings will be coming soon. --- .../overlays/sun8i-a83t-bananapi-m3-emac.dtso | 29 ++++++++++++ sys/dts/arm/overlays/sun8i-a83t-emac.dtso | 44 +++++++++++++++++++ sys/dts/arm/overlays/sun8i-a83t-sid.dtso | 17 +++++++ 3 files changed, 90 insertions(+) create mode 100644 sys/dts/arm/overlays/sun8i-a83t-bananapi-m3-emac.dtso create mode 100644 sys/dts/arm/overlays/sun8i-a83t-emac.dtso create mode 100644 sys/dts/arm/overlays/sun8i-a83t-sid.dtso diff --git a/sys/dts/arm/overlays/sun8i-a83t-bananapi-m3-emac.dtso b/sys/dts/arm/overlays/sun8i-a83t-bananapi-m3-emac.dtso new file mode 100644 index 000000000000..1e48bcb37d8f --- /dev/null +++ b/sys/dts/arm/overlays/sun8i-a83t-bananapi-m3-emac.dtso @@ -0,0 +1,29 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "sinovoip,bpi-m3"; + + fragment@0 { + target = <&mdio>; + __overlay__ { + rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x1>; + }; + }; + }; + + fragment@1 { + target = <&emac>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&emac_rgmii_pins>; + phy-handle = <&rgmii_phy>; + phy-mode = "rgmii"; + rx-delay = <0x7>; + tx-delay = <0x7>; + status = "okay"; + }; + }; +}; diff --git a/sys/dts/arm/overlays/sun8i-a83t-emac.dtso b/sys/dts/arm/overlays/sun8i-a83t-emac.dtso new file mode 100644 index 000000000000..ae37c02e6bd0 --- /dev/null +++ b/sys/dts/arm/overlays/sun8i-a83t-emac.dtso @@ -0,0 +1,44 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun8i-a83t"; + + fragment@0 { + target = <&pio>; + __overlay__ { + emac_rgmii_pins: emac-rgmii-pins { + pins = "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", + "PD11", "PD12", "PD13", "PD14", "PD18", + "PD19", "PD20", "PD21", "PD22", "PD23"; + function = "emac"; + drive-strength = <0x28>; + }; + }; + }; + + fragment@1 { + target-path = "/soc"; + __overlay__ { + emac: ethernet@1c30000 { + compatible = "allwinner,sun8i-a83t-emac"; + syscon = <&syscon>; + reg = <0x1c30000 0x104>; + interrupts = <0x0 0x52 0x4>; + interrupt-names = "macirq"; + resets = <&ccu 0xd>; + reset-names = "ahb"; + clocks = <&ccu 0x1b>; + clock-names = "ahb"; + #address-cells = <0x1>; + #size-cells = <0x0>; + status = "disabled"; + mdio: mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <0x1>; + #size-cells = <0x0>; + }; + }; + }; + }; +}; diff --git a/sys/dts/arm/overlays/sun8i-a83t-sid.dtso b/sys/dts/arm/overlays/sun8i-a83t-sid.dtso new file mode 100644 index 000000000000..c43322c39742 --- /dev/null +++ b/sys/dts/arm/overlays/sun8i-a83t-sid.dtso @@ -0,0 +1,17 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun8i-a83t"; + + fragment@0 { + target-path = "/soc"; + __overlay__ { + sid: eeprom@1c14000 { + compatible = "allwinner,sun8i-a83t-sid"; + reg = <0x1c14000 0x400>; + status = "okay"; + }; + }; + }; +};