Other Parts Discussed in Thread: TLV320AIC3262, AM5728
/* * Copyright (C) 2014-2016 Texas Instruments Incorporated - http://www.ti.com/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ /********************** MODIFICATION HISTORY *********************************************** TAG Date Name Remarks [00] 30-05-2021 DARSH Added new device tree nodes for devices [01] 30-06-2021 DARSH Device tree entries for hookswitch using gpio_keys [02] 30-06-2021 DARSH Update keypad status [03] 12-07-2021 DARSH Changed reset for PCIe [04] 03-08-2021 DARSH Update CAM_PWR_EN to ACTIVE_LOW after hw rework [05] 03-08-2021 DARSH Changed compatible for EEPROM [06] 25-08-2021 DARSH Reversed Hook Switch direction - to prevent locking *******************************************************************************************/ /dts-v1/; #include "dra74x.dtsi" #include "am57xx-commercial-grade.dtsi" #include "dra74x-mmc-iodelay.dtsi" #include "dra74-ipu-dsp-common.dtsi" #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/leds/leds-pca955x.h> #include <dt-bindings/input/input.h> / { compatible = "ti,am572x-beagle-x15", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7"; aliases { rtc0 = &mcp_rtc; rtc1 = &tps659038_rtc; rtc2 = &rtc; display0 = "/display"; display1 = "/connector"; sound0 = &sound0; sound1 = &hdmi; }; // [01] gpio_keys { compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; USER1 { gpios = <&gpio1 14 0>; // [06] label = "HOOK_INT"; linux,code = <KEY_UP>; }; USER2 { gpios = <&gpio2 6 1>; label = "KEYL_INT"; linux,code = <KEY_HOME>; }; }; chosen { stdout-path = &uart3; }; memory@0 { device_type = "memory"; reg = <0x0 0x80000000 0x0 0x80000000>; }; reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; ipu2_memory_region: ipu2-memory@95800000 { compatible = "shared-dma-pool"; reg = <0x0 0x95800000 0x0 0x3800000>; reusable; status = "okay"; }; dsp1_memory_region: dsp1-memory@99000000 { compatible = "shared-dma-pool"; reg = <0x0 0x99000000 0x0 0x4000000>; reusable; status = "okay"; }; ipu1_memory_region: ipu1-memory@9d000000 { compatible = "shared-dma-pool"; reg = <0x0 0x9d000000 0x0 0x2000000>; reusable; status = "okay"; }; dsp2_memory_region: dsp2-memory@9f000000 { compatible = "shared-dma-pool"; reg = <0x0 0x9f000000 0x0 0x800000>; reusable; status = "okay"; }; }; main_12v0: fixedregulator-main_12v0 { /* main supply */ compatible = "regulator-fixed"; regulator-name = "main_12v0"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; regulator-always-on; regulator-boot-on; }; evm_5v0: fixedregulator-evm_5v0 { /* Output of TPS54531D */ compatible = "regulator-fixed"; regulator-name = "evm_5v0"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; vin-supply = <&main_12v0>; regulator-always-on; regulator-boot-on; }; vdd_3v3: fixedregulator-vdd_3v3 { compatible = "regulator-fixed"; regulator-name = "vdd_3v3"; vin-supply = <®en1>; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; aic_dvdd: fixedregulator-aic_dvdd { compatible = "regulator-fixed"; regulator-name = "aic_dvdd_fixed"; vin-supply = <&vdd_3v3>; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; vtt_fixed: fixedregulator-vtt { /* TPS51200 */ compatible = "regulator-fixed"; regulator-name = "vtt_fixed"; vin-supply = <&smps3_reg>; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; regulator-boot-on; enable-active-high; gpio = <&gpio7 11 GPIO_ACTIVE_HIGH>; }; gpio_fan: gpio_fan { /* Based on 5v 500mA AFB02505HHB */ compatible = "gpio-fan"; gpios = <&tps659038_gpio 2 GPIO_ACTIVE_HIGH>; gpio-fan,speed-map = <0 0>, <13000 1>; #cooling-cells = <2>; }; //[00] clk_ov5640_fixed: clk_ov5640_fixed { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <24000000>; }; clk_ov5640: clk_ov5640 { compatible = "gpio-gate-clock"; #clock-cells = <0>; clocks = <&clk_ov5640_fixed>; enable-gpios = <&gpio5 18 GPIO_ACTIVE_LOW>; //[04] }; //[00] LCD Device entry lcd0: display { compatible = "bolymin,btz070f-chc" ,"panel-dpi"; //compatible = "osddisplays,osd070t1718-19ts" ,"panel-dpi"; backlight = <&lcd_bl>; enable-gpios = <&gpio5 12 GPIO_ACTIVE_HIGH>; label = "lcd"; /*panel-timing { clock-frequency = <51200000>; de-active = <1>; hactive = <1024>; hback-porch = <12>; hfront-porch = <85>; hsync-active = <0>; hsync-len = <8>; pixelclk-active = <1>; vactive = <600>; vback-porch = <12>; vfront-porch = <12>; vsync-active = <0>; vsync-len = <8>; };*/ port { lcd_in: endpoint { remote-endpoint = <&dpi_out>; }; }; }; lcd_bl: backlight { compatible = "pwm-backlight"; brightness-levels = <0 32 64 96 128 160 192 255>; default-brightness-level = <8>; pwms = <&ehrpwm0 0 50000 0>; }; sound0: sound0 { compatible = "simple-audio-card"; simple-audio-card,name = "BeagleBoard-X15"; /* simple-audio-card,widgets = // "Speaker", "Headphone Speaker", "Microphone", "Microphone External", "Speaker", "Speaker External", "Speaker", "Handset Speaker", "Microphone", "Handset Microphone"; simple-audio-card,routing = // "Headphone Speaker", "HPL", // "Headphone Speaker", "HPR", "Speaker External", "SPKL", "Speaker External", "SPKR", "Handset Speaker", "RECL", "Handset Speaker", "RECR", "IN3L", "Microphone External", "IN3R", "Microphone External"; */ simple-audio-card,format = "dsp_b"; //simple-audio-card,bitclock-master = <&sound0_master>; //simple-audio-card,frame-master = <&sound0_master>; simple-audio-card,bitclock-master = <&cpu_dai>; simple-audio-card,frame-master = <&cpu_dai>; simple-audio-card,bitclock-inversion; cpu_dai: simple-audio-card,cpu { sound-dai = <&mcasp3>; //system-clock-direction-out; //system-clock-frequency=<24000000>; clocks = <&clkout2_clk>; }; sound0_master: simple-audio-card,codec { sound-dai = <&tlv320aic3212>; //system-clock-frequency=<12288000>; //system-clock-direction-out; clocks = <&clkout2_clk>; }; }; }; &i2c1 { status = "okay"; clock-frequency = <400000>; tps659038: tps659038@58 { compatible = "ti,tps659038"; reg = <0x58>; interrupt-parent = <&gpio1>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; #interrupt-cells = <2>; interrupt-controller; ti,system-power-controller; ti,palmas-override-powerhold; tps659038_pmic { compatible = "ti,tps659038-pmic"; regulators { smps12_reg: smps12 { /* VDD_MPU */ regulator-name = "smps12"; regulator-min-microvolt = < 850000>; regulator-max-microvolt = <1250000>; regulator-always-on; regulator-boot-on; }; smps3_reg: smps3 { /* VDD_DDR */ regulator-name = "smps3"; regulator-min-microvolt = <1350000>; regulator-max-microvolt = <1350000>; regulator-always-on; regulator-boot-on; }; smps45_reg: smps45 { /* VDD_DSPEVE, VDD_IVA, VDD_GPU */ regulator-name = "smps45"; regulator-min-microvolt = < 850000>; regulator-max-microvolt = <1250000>; regulator-always-on; regulator-boot-on; }; smps6_reg: smps6 { /* VDD_CORE */ regulator-name = "smps6"; regulator-min-microvolt = <850000>; regulator-max-microvolt = <1150000>; regulator-always-on; regulator-boot-on; }; /* SMPS7 unused */ smps8_reg: smps8 { /* VDD_1V8 */ regulator-name = "smps8"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; regulator-boot-on; }; /* SMPS9 unused */ ldo1_reg: ldo1 { /* VDD_SD / VDDSHV8 */ regulator-name = "ldo1"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-boot-on; regulator-always-on; }; ldo2_reg: ldo2 { /* VDD_SHV5 */ regulator-name = "ldo2"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; regulator-boot-on; }; ldo3_reg: ldo3 { /* VDDA_1V8_PHYA */ regulator-name = "ldo3"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; regulator-boot-on; }; ldo4_reg: ldo4 { /* VDDA_1V8_PHYB */ regulator-name = "ldo4"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; regulator-boot-on; }; ldo9_reg: ldo9 { /* VDD_RTC */ regulator-name = "ldo9"; regulator-min-microvolt = <1050000>; regulator-max-microvolt = <1050000>; regulator-always-on; regulator-boot-on; }; ldoln_reg: ldoln { /* VDDA_1V8_PLL */ regulator-name = "ldoln"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; regulator-boot-on; }; ldousb_reg: ldousb { /* VDDA_3V_USB: VDDA_USBHS33 */ regulator-name = "ldousb"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-boot-on; }; regen1: regen1 { /* VDD_3V3_ON */ regulator-name = "regen1"; regulator-boot-on; regulator-always-on; }; }; }; tps659038_rtc: tps659038_rtc { compatible = "ti,palmas-rtc"; interrupt-parent = <&tps659038>; interrupts = <8 IRQ_TYPE_EDGE_FALLING>; wakeup-source; }; tps659038_pwr_button: tps659038_pwr_button { compatible = "ti,palmas-pwrbutton"; interrupt-parent = <&tps659038>; interrupts = <1 IRQ_TYPE_EDGE_FALLING>; wakeup-source; ti,palmas-long-press-seconds = <12>; }; tps659038_gpio: tps659038_gpio { compatible = "ti,palmas-gpio"; gpio-controller; #gpio-cells = <2>; }; extcon_usb2: tps659038_usb { compatible = "ti,palmas-usb-vid"; ti,enable-vbus-detection; vbus-gpio = <&gpio4 21 GPIO_ACTIVE_HIGH>; }; }; eeprom: eeprom@50 { compatible = "atmel,24c256"; //[05] reg = <0x50>; }; }; /* [00] :: Added Temp sensor & LED controller */ &i2c2 { status = "okay"; clock-frequency = <400000>; proc_temp: lm75@48 { compatible = "national,lm75a"; reg = <0x48>; interrupt-parent = <&gpio7>; interrupts = <8 IRQ_TYPE_LEVEL_LOW>; #thermal-sensor-cells = <1>; }; handset_temp: lm75@49 { compatible = "national,lm75a"; reg = <0x49>; interrupt-parent = <&gpio6>; interrupts = <18 IRQ_TYPE_LEVEL_LOW>; #thermal-sensor-cells = <0>; }; pca9550: pca9550@60 { compatible = "nxp,pca9550"; #address-cells = <1>; #size-cells = <0>; reg = <0x60>; led@0 { label = "green:power"; reg = <0>; type = <PCA955X_TYPE_LED>; }; led@1 { label = "red:power"; linux,default-trigger = "default-on"; reg = <1>; type = <PCA955X_TYPE_LED>; }; }; tpm: tpm@29 { compatible = "atmel,at97sc3204t"; reg = <0x29>; }; }; //[00] &vin3a { vin3a_ep: endpoint { remote-endpoint = <&cam>; slave-mode; }; }; &vip2 { status = "okay"; }; /* [00] :: Added Camera & RTC */ &i2c3 { status = "okay"; clock-frequency = <400000>; mcp_rtc: rtc@6f { compatible = "microchip,mcp7941x"; reg = <0x6f>; interrupts-extended = <&crossbar_mpu GIC_SPI 2 IRQ_TYPE_EDGE_RISING>, <&dra7_pmx_core 0x424>; interrupt-names = "irq", "wakeup"; vcc-supply = <&vdd_3v3>; wakeup-source; }; ov5640@3c { compatible = "ovti,ov5640"; reg = <0x3c>; clocks = <&clk_ov5640>; clock-names = "xclk"; powerdown-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>; port { cam: endpoint { bus-width = <8>; data-shift = <0>; hsync-active = <1>; vsync-active = <0>; pclk-sample = <0>; remote-endpoint = <&vin3a_ep>; }; }; }; }; &i2c4 { status = "okay"; clock-frequency = <400000>; tlv320aic3212: tlv320aic3212@18 { #sound-dai-cells = <0>; compatible = "ti,aic3262"; // compatible = "ti,tlv320aic3104"; reg = <0x18>; assigned-clocks = <&clkoutmux2_clk_mux>; assigned-clock-parents = <&sys_clk2_dclk_div>; adc-settle-ms = <40>; status ="okay"; //AVDD-supply = <&vdd_3v3>; //IOVDD-supply = <&vdd_3v3>; // DRVDD-supply = <&vdd_3v3>; //DVDD-supply = <&aic_dvdd>; }; }; &ehrpwm0 { status = "okay"; }; &epwmss0 { status = "okay"; }; /* &ehrpwm1 { status = "okay"; }; &epwmss1 { status = "okay"; }; &ehrpwm2 { status = "okay"; }; &epwmss2 { status = "okay"; }; */ /* [00] :: Added Touch panel entries */ &i2c5 { status = "okay"; clock-frequency = <400000>; polytouch: edt-ft5x06@38 { compatible = "edt,edt-ft5x06"; reg = <0x38>; attb-gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>; interrupt-parent = <&gpio5>; interrupts = <9 0>; //reset-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>; //wake-gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>; touchscreen-size-x = <1024>; touchscreen-size-y = <600>; wakeup-source; }; }; //Sample code to control GPIO from device tree /* &gpio5 { p18 { gpio-hog; gpios = <18 0>; line-name = "cm-camen-gpio"; output-low; }; }; */ &gpio7 { ti,no-reset-on-init; ti,no-idle-on-init; }; &cpu0 { vdd-supply = <&smps12_reg>; voltage-tolerance = <1>; }; &uart3 { status = "okay"; interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, <&dra7_pmx_core 0x3f8>; }; &davinci_mdio { phy0: ethernet-phy@0 { reg = <0>; }; phy1: ethernet-phy@1 { reg = <1>; }; }; &mac { status = "okay"; dual_emac; }; &cpsw_emac0 { phy-handle = <&phy0>; phy-mode = "rgmii"; dual_emac_res_vlan = <1>; }; &cpsw_emac1 { phy-handle = <&phy1>; phy-mode = "rgmii"; dual_emac_res_vlan = <2>; }; &mmc1 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&mmc1_pins_default>; bus-width = <4>; cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */ /* Check For Custom Board */ no-1-8-v; }; &mmc2 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&mmc2_pins_default>; vmmc-supply = <&vdd_3v3>; vqmmc-supply = <&vdd_3v3>; bus-width = <8>; non-removable; no-1-8-v; }; &sata { status = "okay"; }; &usb2_phy1 { phy-supply = <&ldousb_reg>; }; &usb2_phy2 { phy-supply = <&ldousb_reg>; }; &usb1 { dr_mode = "host"; }; &omap_dwc3_2 { extcon = <&extcon_usb2>; }; &usb2 { /* * Stand alone usage is peripheral only. * However, with some resistor modifications * this port can be used via expansion connectors * as "host" or "dual-role". If so, provide * the necessary dr_mode override in the expansion * board's DT. */ dr_mode = "peripheral"; }; &cpu_trips { cpu_alert1: cpu_alert1 { temperature = <50000>; /* millicelsius */ hysteresis = <2000>; /* millicelsius */ type = "active"; }; }; &cpu_cooling_maps { map1 { trip = <&cpu_alert1>; cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; &thermal_zones { board_thermal: board_thermal { polling-delay-passive = <1250>; /* milliseconds */ polling-delay = <1500>; /* milliseconds */ /* sensor ID */ thermal-sensors = <&proc_temp 0>; board_trips: trips { board_alert0: board_alert { temperature = <40000>; /* millicelsius */ hysteresis = <2000>; /* millicelsius */ type = "active"; }; board_crit: board_crit { temperature = <105000>; /* millicelsius */ hysteresis = <0>; /* millicelsius */ type = "critical"; }; }; board_cooling_maps: cooling-maps { map0 { trip = <&board_alert0>; cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; }; }; &gpu { status = "ok"; }; //[02] &keypad { status = "okay"; }; &dss { status = "ok"; vdda_video-supply = <&ldoln_reg>; ports { #address-cells = <1>; #size-cells = <0>; port { reg = <0>; dpi_out: endpoint { data-lines = <24>; remote-endpoint = <&lcd_in>; }; }; }; }; &bb2d { status = "okay"; }; //[03] &pcie1_rc { status = "okay"; //gpios = <&gpio5 10 GPIO_ACTIVE_HIGH>; //Remap PERST to GPIO }; &pcie1_phy { status = "okay"; }; /* &pcie2_rc { status = "okay"; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; &pcie2_phy { status = "okay"; };*/ &mcasp3 { #sound-dai-cells = <0>; assigned-clocks = <&l4per_clkctrl DRA7_MCASP3_CLKCTRL 24>; assigned-clock-parents = <&sys_clkin2>; status = "okay"; op-mode = <0>; /* MCASP_IIS_MODE */ tdm-slots = <2>; /* 4 serializers */ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ 1 2 0 0 >; tx-num-evt = <32>; rx-num-evt = <32>; }; &pruss_soc_bus1 { status = "okay"; pruss1: pruss@4b200000 { status = "okay"; }; }; &pruss_soc_bus2 { status = "okay"; pruss2: pruss@4b280000 { status = "okay"; }; }; &ipu2 { status = "okay"; memory-region = <&ipu2_memory_region>; }; &ipu1 { status = "okay"; memory-region = <&ipu1_memory_region>; }; &dsp1 { status = "okay"; memory-region = <&dsp1_memory_region>; }; &dsp2 { status = "okay"; memory-region = <&dsp2_memory_region>; }; #include "dra7-ipu-common-early-boot.dtsi"