]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/dts/sun8i-h3-orangepi-pc.dts
sunxi: DT: H3: update board .dts files from Linux
[u-boot] / arch / arm / dts / sun8i-h3-orangepi-pc.dts
index 0a74a9193bbfc06d54efb7a301340c14d5390378..46240334128f29bf24e79650d514ad8e1b27c1af 100644 (file)
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
        model = "Xunlong Orange Pi PC";
        compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
 
        aliases {
+               ethernet0 = &emac;
                serial0 = &uart0;
        };
 
                stdout-path = "serial0:115200n8";
        };
 
-       leds {
-               compatible = "gpio-leds";
-               pinctrl-names = "default";
-               pinctrl-0 = <&leds_opc>;
+       connector {
+               compatible = "hdmi-connector";
+               type = "a";
 
-               status_led {
-                       label = "status:red:user";
-                       gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
                };
        };
 
-       r_leds {
+       leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&leds_r_opc>;
+               pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
 
-               tx {
-                       label = "pwr:green:user";
+               pwr_led {
+                       label = "orangepi:green:pwr";
                        gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
+
+               status_led {
+                       label = "orangepi:red:status";
+                       gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
+               };
        };
 
        r_gpio_keys {
                compatible = "gpio-keys";
-               input-name = "sw4";
-
                pinctrl-names = "default";
                pinctrl-0 = <&sw_r_opc>;
 
-               sw4@0 {
+               sw4 {
                        label = "sw4";
                        linux,code = <BTN_0>;
                        gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
        };
 };
 
+&codec {
+       allwinner,audio-routing =
+               "Line Out", "LINEOUT",
+               "MIC1", "Mic",
+               "Mic",  "MBIAS";
+       status = "okay";
+};
+
+&de {
+       status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&reg_vdd_cpux>;
+};
+
+&ehci0 {
+       status = "okay";
+};
+
 &ehci1 {
        status = "okay";
 };
        status = "okay";
 };
 
+&emac {
+       phy-handle = <&int_mii_phy>;
+       phy-mode = "mii";
+       allwinner,leds-active-low;
+       status = "okay";
+};
+
+&hdmi {
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
 &ir {
        pinctrl-names = "default";
        pinctrl-0 = <&ir_pins_a>;
 };
 
 &mmc0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
-       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
-       cd-inverted;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+       status = "okay";
+};
+
+&ohci0 {
        status = "okay";
 };
 
 };
 
 &pio {
-       leds_opc: led_pins@0 {
-               allwinner,pins = "PA15";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       leds_opc: led_pins {
+               pins = "PA15";
+               function = "gpio_out";
+       };
+};
+
+&r_i2c {
+       status = "okay";
+
+       reg_vdd_cpux: regulator@65 {
+               compatible = "silergy,sy8106a";
+               reg = <0x65>;
+               regulator-name = "vdd-cpux";
+               silergy,fixed-microvolt = <1200000>;
+               /*
+                * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
+                * however both the Armbian DVFS table and the official one
+                * have operating points with voltage under 1.1V, and both
+                * DVFS table are known to work properly at the lowest
+                * operating point.
+                *
+                * Use 1.0V as the minimum voltage instead.
+                */
+               regulator-min-microvolt = <1000000>;
+               regulator-max-microvolt = <1300000>;
+               regulator-boot-on;
+               regulator-always-on;
        };
 };
 
 &r_pio {
-       leds_r_opc: led_pins@0 {
-               allwinner,pins = "PL10";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       leds_r_opc: led_pins {
+               pins = "PL10";
+               function = "gpio_out";
        };
 
-       sw_r_opc: key_pins@0 {
-               allwinner,pins = "PL03";
-               allwinner,function = "gpio_in";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       sw_r_opc: key_pins {
+               pins = "PL3";
+               function = "gpio_in";
        };
 };
 
+&reg_usb0_vbus {
+       gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
        status = "okay";
 };
 
-&usbphy {
-       /* USB VBUS is always on */
-       status = "okay";
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>;
+       status = "disabled";
 };
 
-&emac {
-       phy = <&phy1>;
-       phy-mode = "mii";
-       allwinner,use-internal-phy;
-       allwinner,leds-active-low;
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins>;
+       status = "disabled";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_pins>;
+       status = "disabled";
+};
+
+&usb_otg {
+       dr_mode = "otg";
        status = "okay";
+};
 
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-       };
+&usbphy {
+       usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
+       /* VBUS on USB host ports are always on */
+       status = "okay";
 };