ARM64: dts: rockchip: add i2c2, i2c4 gpio func support for rk3366
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3366-tb.dts
index 1f84d52148cb8a473bf3fcf784957c10ddc86b23..e11a951142f0e43e3eb2917cbbe3cb33e2febe6d 100644 (file)
@@ -49,7 +49,7 @@
        compatible = "rockchip,tb", "rockchip,rk3366";
 
        chosen {
-               bootargs = "console=uart,mmio32,0xff690000";
+               bootargs = "console=uart,mmio32,0xff690000 clk_ignore_unused";
        };
 
        ion {
                };
 
                power-key {
-                       gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
                        linux,code = <116>;
                        label = "power";
                        gpio-key,wakeup;
                };
        };
 
+       rt5640-sound {
+               compatible = "simple-audio-card";
+               simple-audio-card,format = "i2s";
+               simple-audio-card,name = "rockchip,rt5640-codec";
+               simple-audio-card,mclk-fs = <256>;
+               simple-audio-card,widgets =
+                       "Microphone", "Mic Jack",
+                       "Headphone", "Headphone Jack";
+               simple-audio-card,routing =
+                       "Mic Jack", "MICBIAS1",
+                       "IN1P", "Mic Jack",
+                       "Headphone Jack", "HPOL",
+                       "Headphone Jack", "HPOR";
+               simple-audio-card,cpu {
+                       sound-dai = <&i2s_8ch>;
+               };
+               simple-audio-card,codec {
+                       sound-dai = <&rt5640>;
+               };
+       };
+
+       spdif-sound {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "rockchip,spdif";
+               simple-audio-card,cpu {
+                       sound-dai = <&spdif>;
+               };
+               simple-audio-card,codec {
+                       sound-dai = <&spdif_out>;
+               };
+       };
+
+       spdif_out: spdif-out {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+       };
+
        vcc_sys: vcc-sys {
                compatible = "regulator-fixed";
                regulator-name = "vcc_sys";
                regulator-min-microvolt = <3800000>;
                regulator-max-microvolt = <3800000>;
        };
+
+       ext_gmac: external-gmac-clock {
+               compatible = "fixed-clock";
+               clock-frequency = <125000000>;
+               clock-output-names = "ext_gmac";
+               #clock-cells = <0>;
+       };
+
+       vcc_phy: vcc-phy-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio0 25 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&eth_phy_pwr>;
+               regulator-name = "vcc_phy";
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       io-domains {
+               compatible = "rockchip,rk3366-io-voltage-domain";
+               rockchip,grf = <&grf>;
+
+               lcdc-supply = <&vcc_io>;
+               dvpts-supply = <&vcc_18>;
+               wifibt-supply = <&vccio_wl>;
+               audio-supply = <&vcc_io>;
+               sdcard-supply = <&vccio_sd>;
+               tphdsor-supply = <&vcc_io>;
+       };
+
+       dwc_control_usb: dwc-control-usb {
+               compatible = "rockchip,rk3368-dwc-control-usb";
+               rockchip,grf = <&grf>;
+               grf-offset = <0x049c>; /* GRF_SOC_STATUS for USB2.0 OTG */
+               interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "otg_id", "otg_bvalid",
+                                 "otg_linestate", "host0_linestate";
+               clocks = <&cru SCLK_USBPHY480M>;
+               clock-names = "usbphy_480m";
+
+               usb_bc {
+                       compatible = "inno,phy";
+                       regbase = &dwc_control_usb;
+                       rk_usb,bvalid     = <0x49c 23 1>;
+                       rk_usb,iddig      = <0x49c 26 1>;
+                       rk_usb,vdmsrcen   = <0x718 12 1>;
+                       rk_usb,vdpsrcen   = <0x718 11 1>;
+                       rk_usb,rdmpden    = <0x718 10 1>;
+                       rk_usb,idpsrcen   = <0x718  9 1>;
+                       rk_usb,idmsinken  = <0x718  8 1>;
+                       rk_usb,idpsinken  = <0x718  7 1>;
+                       rk_usb,dpattach   = <0x498 31 1>;
+                       rk_usb,cpdet      = <0x498 30 1>;
+                       rk_usb,dcpattach  = <0x498 29 1>;
+               };
+       };
+
+       i2c@2 {
+               compatible = "i2c-gpio";
+               gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>, /* sda */
+                       <&gpio5 16 GPIO_ACTIVE_HIGH>; /* scl */
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c2_gpio>;
+               status = "disabled";
+       };
+
+       i2c@4 {
+               compatible = "i2c-gpio";
+               gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>, /* sda */
+                       <&gpio5 8 GPIO_ACTIVE_HIGH>; /* scl */
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c4_gpio>;
+               status = "okay";
+
+               gt9xx: gt9xx@14 {
+                       compatible = "goodix,gt9xx";
+                       reg = <0x14>;
+                       touch-gpio = <&gpio5 11 IRQ_TYPE_LEVEL_LOW>;
+                       reset-gpio = <&gpio5 10 GPIO_ACTIVE_HIGH>;
+                       max-x = <1200>;
+                       max-y = <1900>;
+                       tp-size = <911>;
+                       tp-supply = <&vcc_tp>;
+                       status = "okay";
+               };
+       };
 };
 
 &emmc {
        };
 };
 
+&i2c1 {
+       status = "okay";
+
+       rt5640: rt5640@1c {
+               #sound-dai-cells = <0>;
+               compatible = "realtek,rt5640";
+               reg = <0x1c>;
+               clocks = <&cru SCLK_I2S_8CH_OUT>;
+               clock-names = "mclk";
+               realtek,in1-differential;
+       };
+};
+
+&i2s_8ch {
+       status = "okay";
+       rockchip,i2s-broken-burst-len;
+       rockchip,playback-channels = <8>;
+       rockchip,capture-channels = <2>;
+       #sound-dai-cells = <0>;
+};
+
+&spdif {
+       status = "okay";
+       #sound-dai-cells = <0>;
+};
+
 &pwm0 {
        status = "okay";
 };
 
 &rk_screen {
        status = "okay";
-       #include <dt-bindings/display/screen-timing/lcd-b101ew05.dtsi>
+       #include <dt-bindings/display/screen-timing/lcd-tv080wum-mipi.dtsi>
+       /* #include <dt-bindings/display/screen-timing/lcd-b101ew05.dtsi> */
 };
 
 &lvds {
        status = "disabled";
 };
 
+&dsihost0 {
+       status = "okay";
+};
+
 &vop_lite {
        status = "okay";
        rockchip,prop = <EXTEND>;
                         rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_up>;
                 };
         };
+};
+
+&gmac {
+       phy-supply = <&vcc_phy>;
+       phy-mode = "rgmii";
+       clock_in_out = "input";
+       snps,reset-gpio = <&gpio2 15 GPIO_ACTIVE_LOW>;
+       snps,reset-active-low;
+       snps,reset-delays-us = <0 10000 50000>;
+       assigned-clocks = <&cru SCLK_MAC>;
+       assigned-clock-parents = <&ext_gmac>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
+       tx_delay = <0x30>;
+       rx_delay = <0x10>;
+       status = "okay";
+};
+
+&dwc_control_usb {
+       host_drv_gpio = <&gpio0 16 GPIO_ACTIVE_LOW>; /* GPIO_C0 = 16 */
+       otg_drv_gpio = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO_B2 = 10 */
+
+       rockchip,remote_wakeup;
+       rockchip,usb_irq_wakeup;
+};
+
+&usb_host0_echi {
+       status = "okay";
+};
+
+&usb_host0_ohci {
+       status = "okay";
+};
+
+&usb_otg {
+       clocks = <&cru SCLK_OTG_PHY0>, <&cru HCLK_OTG>;
+       clock-names = "sclk_otgphy0", "otg";
+       resets = <&cru SRST_USBOTG_AHB>,
+                <&cru SRST_USBOTG_PHY>,
+                <&cru SRST_USBOTG_CON>;
+       reset-names = "otg_ahb", "otg_phy", "otg_controller";
+       /* 0 - Normal, 1 - Force Host, 2 - Force Device */
+       rockchip,usb-mode = <0>;
+       status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&syr827>;
 };
\ No newline at end of file