sunxi: dts: R40: Update Bananapi M2 Berry .dts
authorAndre Przywara <andre.przywara@arm.com>
Wed, 1 Jan 2020 23:44:46 +0000 (23:44 +0000)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 24 Jan 2020 17:36:50 +0000 (23:06 +0530)
Update the .dts file from the kernel, which carries much more nodes,
some of them we need to enable USB and Ethernet support for the board.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts

index 54ad4db..15c22b0 100644 (file)
@@ -50,6 +50,7 @@
        compatible = "sinovoip,bpi-m2-berry", "allwinner,sun8i-r40";
 
        aliases {
+               ethernet0 = &gmac;
                serial0 = &uart0;
        };
 
                stdout-path = "serial0:115200n8";
        };
 
+       connector {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
 
        wifi_pwrseq: wifi_pwrseq {
                compatible = "mmc-pwrseq-simple";
                reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */
+               clocks = <&ccu CLK_OUTA>;
+               clock-names = "ext_clock";
        };
 };
 
 &ahci {
-       phy-supply = <&reg_eldo3>;      /* VDD12-SATA */
-       ahci-supply = <&reg_dldo4>;     /* VDD25-SATA */
+       ahci-supply = <&reg_dldo4>;
+       phy-supply = <&reg_eldo3>;
+       status = "okay";
+};
+
+&de {
        status = "okay";
 };
 
        status = "okay";
 };
 
+&gmac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&gmac_rgmii_pins>;
+       phy-handle = <&phy1>;
+       phy-mode = "rgmii";
+       phy-supply = <&reg_dc1sw>;
+       status = "okay";
+};
+
+&gmac_mdio {
+       phy1: ethernet-phy@1 {
+               compatible = "ethernet-phy-ieee802.3-c22";
+               reg = <1>;
+       };
+};
+
+&hdmi {
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
 &i2c0 {
        status = "okay";
 
 
 #include "axp22x.dtsi"
 
+&mmc0 {
+       vmmc-supply = <&reg_dcdc1>;
+       bus-width = <4>;
+       cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW>; /* PH13 */
+       status = "okay";
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pg_pins>;
+       vmmc-supply = <&reg_dldo2>;
+       vqmmc-supply = <&reg_dldo1>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+};
+
+&pio {
+       pinctrl-names = "default";
+       pinctrl-0 = <&clk_out_a_pin>;
+       vcc-pa-supply = <&reg_aldo2>;
+       vcc-pc-supply = <&reg_dcdc1>;
+       vcc-pd-supply = <&reg_dcdc1>;
+       vcc-pe-supply = <&reg_eldo1>;
+       vcc-pf-supply = <&reg_dcdc1>;
+       vcc-pg-supply = <&reg_dldo1>;
+};
+
+&reg_aldo2 {
+       regulator-min-microvolt = <2500000>;
+       regulator-max-microvolt = <2500000>;
+       regulator-name = "vcc-pa";
+};
+
 &reg_aldo3 {
        regulator-always-on;
        regulator-min-microvolt = <2700000>;
        regulator-name = "avcc";
 };
 
+&reg_dc1sw {
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-gmac-phy";
+};
+
 &reg_dcdc1 {
        regulator-always-on;
        regulator-min-microvolt = <3000000>;
        regulator-name = "vcc-wifi-io";
 };
 
+/*
+ * Our WiFi chip needs both DLDO2 and DLDO3 to be powered at the same
+ * time, with the two being in sync, to be able to meet maximum power
+ * consumption during transmits. Since this is not really supported
+ * right now, just use the two as always on, and we will fix it later.
+ */
+
 &reg_dldo2 {
+       regulator-always-on;
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        regulator-name = "vcc-wifi";
 };
 
+&reg_dldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi-2";
+};
+
 &reg_dldo4 {
        regulator-min-microvolt = <2500000>;
        regulator-max-microvolt = <2500000>;
        regulator-name = "vdd1v2-sata";
 };
 
-&mmc0 {
-       vmmc-supply = <&reg_dcdc1>;
-       bus-width = <4>;
-       cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW>; /* PH13 */
+&tcon_tv0 {
        status = "okay";
 };
 
-&mmc1 {
+&uart0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&mmc1_pg_pins>;
-       vmmc-supply = <&reg_dldo2>;
-       vqmmc-supply = <&reg_dldo1>;
-       mmc-pwrseq = <&wifi_pwrseq>;
-       bus-width = <4>;
-       non-removable;
+       pinctrl-0 = <&uart0_pb_pins>;
        status = "okay";
 };
 
-&uart0 {
+&uart3 {
        pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pb_pins>;
+       pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_cts_pg_pins>;
+       uart-has-rtscts;
        status = "okay";
+
+       bluetooth {
+               compatible = "brcm,bcm43438-bt";
+               clocks = <&ccu CLK_OUTA>;
+               clock-names = "lpo";
+               vbat-supply = <&reg_dldo2>;
+               vddio-supply = <&reg_dldo1>;
+               device-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
+               /* TODO host wake line connected to PMIC GPIO pins */
+               shutdown-gpios = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
+               max-speed = <1500000>;
+       };
 };
 
 &usbphy {