]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
arm64: jetson-cv: add TCA9539 device and fixed reg
authorShreshtha SAHU <ssahu@nvidia.com>
Thu, 21 May 2015 06:26:27 +0000 (11:56 +0530)
committerShreshtha Sahu <ssahu@nvidia.com>
Thu, 9 Jul 2015 05:45:14 +0000 (22:45 -0700)
Add TI's TCA9539 GPIO expander devices which is present on I2C bus-2
at addresses 0x74 and 0x77 and uses GPIO_PL1 and GPIO_PZ2 as interrupts
respectively.

Add default states of each GPIO pin.
Add TCA9539 GPIO expander controlled fixed regulators.
Add regulators for hdmi, lcd, ethernet and pwm-fan.
PMIC GPIO7 controls LDO7 output 1v05

Bug 1606897

Change-Id: I9f8261c8b646c46fd418b48dd83fe33b8d2d9c1f
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/743611
(cherry picked from commit de6b9d4fab13b494cb489a7f1734061e09f6fd1d)
Reviewed-on: http://git-master/r/764215
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
arch/arm64/boot/dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
arch/arm64/boot/dts/tegra210-jetson-e-base-p2595-0000-a00.dts
arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-power-tree-p2597-2180-a00.dtsi [new file with mode: 0644]

index d9c21549b2f70e9f70cce0070e5dcb42124d8ef5..be2ecd86cef3eb09100e4c7dcd0596b275ea4570 100644 (file)
@@ -19,7 +19,7 @@
 /memreserve/ 0x80000000 0x00020000;
 
 #include "tegra210-common.dtsi"
-#include "tegra210-platforms/tegra210-jetson-e-power-tree-p2530-0930-e03.dtsi"
+#include "tegra210-platforms/tegra210-jetson-cv-power-tree-p2597-2180-a00.dtsi"
 #include "tegra210-platforms/tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi"
 #include "tegra210-platforms/tegra210-jetson-cv-sdmmc-drv-p2597-2180-a00.dtsi"
 #include "tegra210-platforms/tegra210-pwm-fan-p2530-0930.dtsi"
                };
        };
 
+       i2c@7000c400 {
+               nvidia,clock-always-on;
+
+               tca9539_74: tca9539@74 {
+                       compatible = "ti,tca9539";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       reg = <0x74>;
+                       interrupt-parent = <&gpio>;
+                       interrupts = <TEGRA_GPIO(L, 1) 0x0>;
+                       gpio-init-names = "default";
+                       gpio-init-0 = <&tca9539_74_default>;
+                       tca9539_74_default: default {
+                               /*
+                                * GPIO-10 : M2_E_ALERT_R_L
+                                * GPIO-13 : TOUCH_ID
+                                */
+                               gpio-input = <10 13>;
+
+                               /*
+                                * GPIO-1 : EN_VDD_TS_1V8_PMIC
+                                * GPIO-2 : EN_VDD_TS_HV_PMIC
+                                * GPIO-3 : EN_VDD_DISP,
+                                * GPIO-4 : PS_VDD_FAN_ENABLE
+                                * GPIO-5 : MDM_EN
+                                * GPIO-7 : MDM_EN, MDM_PWR_EN
+                                * GPIO-11 : VDD_DISP_MUX_EN
+                                * GPIO-12 : FLASH_INHIBIT
+                                * GPIO-14 : 5V0_HDMI_EN
+                                * GPIO-15 : EN_VDD_CAM_HV
+                                * GPIO-16,17 : TP83, TP84
+                                */
+                               gpio-output-low = <1 2 3 4 5 7 11 12 14 15 16 17>;
+
+                               /*
+                                * GPIO-0 : W_DISABLE_L
+                                * GPIO-6 : MDM_RST_L
+                                */
+                               gpio-output-high = <0 6>;
+                       };
+               };
+
+               tca9539_77: tca9539@77 {
+                       compatible = "ti,tca9539";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       reg = <0x77>;
+                       interrupt-parent = <&gpio>;
+                       interrupts = <TEGRA_GPIO(Z, 2) 0x0>;
+                       gpio-init-names = "default";
+                       gpio-init-0 = <&tca9539_74_default>;
+                       tca9539_77_default: default {
+                               /*
+                                * GPIO-0 : DISP_CHARGER_STAT
+                                * GPIO-1 : DISP_TYPEC_ORIENT
+                                */
+                               gpio-input = <0 1>;
+
+                               /*
+                                * GPIO-2 : TYPEC_INT            Charger control HDR
+                                * GPIO-3 : VDD_SYS_EN           CAM HEADER
+                                * GPIO-4 : LCD_BIAS_EN          CAM HEADER
+                                * GPIO-5 : TORCH_EN             CAM HEADER
+                                * GPIO-6 : FLASH_INHIBIT        CAM HEADER
+                                * GPIO-7 : CAM2_PWDN            CAM HEADER
+                                * GPIO-10 : CAM2_RST            CAM HEADER
+                                * GPIO-11 : CAM_VDD_1V8_EN      CAM HEADER
+                                * GPIO-12 : CAM_VDD_1V2_EN      CAM HEADER
+                                * GPIO-13 : CAM_AF_PWDN         CAM HEADER
+                                * GPIO-14 : CHG_BD_PRSNT_L      CAM HEADER
+                                * GPIO-15 : BRIDGE_EN           CAM HEADER
+                                * GPIO-16 : NVSR_INT            CAM HEADER
+                                * GPIO-17 : BRIDGE_IRQ          CAM HEADER
+                                */
+                               gpio-output-low = <2 3 4 5 6 7 10 11 12 13 14 15 16 17>;
+                       };
+               };
+       };
+
        i2c@546c0000 {
                avdd_dsi_csi-supply = <&max77620_gpio7>;
        };
index 5915610774ffdf90845cc53a2f58884c15564fee..0a7d2ae07f64ea459796b39b2c23996f4590b86e 100644 (file)
                                0 0 0 0 0>;
        };
 
+       regulators {
+               vdd_fan: regulator@13 {
+                       enable-active-high;
+               };
+       };
+
        pwm-fan {
                compatible = "pwm-fan";
                shared_data = <&pwm_fan_shared_data>;
diff --git a/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-power-tree-p2597-2180-a00.dtsi b/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-power-tree-p2597-2180-a00.dtsi
new file mode 100644 (file)
index 0000000..c962adc
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2015, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+#include "tegra210-jetson-e-power-tree-p2530-0930-e03.dtsi"
+
+/ {
+       regulators {
+               compatible = "simple-bus";
+               device_type = "fixed-regulators";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               max77620_gpio7: regulator@2 {
+                       regulator-min-microvolt = <1050000>;
+                       regulator-max-microvolt = <1050000>;
+                       vin-supply = <&max77620_ldo7>;
+               };
+
+               en_vdd_sd: regulator@4 {
+                       gpio = <&gpio TEGRA_GPIO(Z, 3) 0>;
+               };
+
+               en_vdd_cam: regulator@5 {
+                       gpio = <&tca9539_77 11 1>;
+               };
+
+               vdd_hdmi: regulator@7 {
+                       gpio = <&tca9539_74 14 1>;
+                       vin-supply = <&vdd_3v3>;
+               };
+
+               vdd_fan: regulator@13 {
+                       compatible = "regulator-fixed-sync";
+                       regulator-name = "vdd-fan";
+                       gpio = <&tca9539_74 4 0>;
+               };
+
+               en_vdd_ts_1v8: regulator@16 {
+                       compatible = "regulator-fixed-sync";
+                       regulator-name = "en-vdd-ts-1v8";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       gpio = <&tca9539_74 1 1>;
+                       enable-active-high;
+               };
+
+               en_vdd_ts_hv_3v3: regulator@17 {
+                       compatible = "regulator-fixed-sync";
+                       regulator-name = "en-vdd-ts-hv-3v3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       gpio = <&tca9539_74 2 1>;
+                       enable-active-high;
+               };
+
+               en_vdd_disp_3v3: regulator@18 {
+                       compatible = "regulator-fixed-sync";
+                       regulator-name = "en-vdd-disp-3v3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       gpio = <&tca9539_74 3 1>;
+                       enable-active-high;
+               };
+
+
+               en_mdm_pwr_3v7: regulator@20 {
+                       compatible = "regulator-fixed-sync";
+                       regulator-name = "en-mdm-pwr-3v7";
+                       regulator-min-microvol = <3700000>;
+                       regulator-max-microvol = <3700000>;
+                       gpio = <&tca9539_74 7 1>;
+                       enable-active-high;
+               };
+
+               en_vdd_disp_mux_3v3: regulator@21 {
+                       compatible = "regulator-fixed-sync";
+                       regulator-name = "en-vdd-disp-3v3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       gpio = <&tca9539_74 11 1>;
+                       enable-active-high;
+               };
+
+               en_vdd_cam_hv_2v8: regulator@22 {
+                       compatible = "regulator-fixed-sync";
+                       regulator-name = "en-vdd-cam-hv-2v8";
+                       regulator-min-microvol = <2800000>;
+                       regulator-max-microvol = <2800000>;
+                       gpio = <&tca9539_74 15 1>;
+                       enable-active-high;
+               };
+
+               en_vdd_eth_5v0: regulator@23 {
+                       compatible = "regulator-fixed-sync";
+                       regulator-name = "rtl-5v0";
+                       regulator-min-microvol = <5000000>;
+                       regulator-max-microvol = <5000000>;
+                       gpio = <&gpio TEGRA_GPIO(H, 1) 0>;
+                       enable-active-high;
+               };
+       };
+
+       host1x {
+               dc@54200000 {
+                       vdd_lcd-supply = <&max77620_ldo0>; /* DSI is POR */
+               };
+               dc@54240000 {
+                       vdd_hdmi_5v0-supply = <&vdd_hdmi>;
+               };
+       };
+
+       pwm-fan {
+               vdd-fan-supply = <&vdd_fan>;
+       };
+};