This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: PMIC device tree problem

Part Number: AM3358
Other Parts Discussed in Thread: TPS65218

Tool/software: Linux

As per described we have used gpio2_18 pin for pmic interrupt.

I'm adding this addittionals in pmic node.

interrupts = <&gpio2 18 IRQ_TYPE_NONE>;
interrupt-controller;
#interrupt-cells = <2>;

then it shows 

OF: ERROR: Bad of_node_put() on /ocp/i2c@44e0b000/tps65218@24 

Can anybody point me how to setup pmic interrupt pin in device tree node.

Thank you,

  • Hi Jigarp,

    You should use "interrupt-parent" approach:

    interrupt-parent = <&gpio2>;
    interrupts = <18 IRQ_TYPE_NONE>; /* gpio2 18 */

    See below pointers for more info:

    linux-kernel/Documentation/devicetree/bindings/interupt-controller/interrupts.txt

    linux-kernel/arch/arm/boot/dts/am437x-sk-evm.dts
    linux-kernel/arch/arm/boot/dts/am335x-evmsk.dts
    linux-kernel/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi


    Regards,
    Pavel
  • Hello,

    Here is my device tree node. I've changed it as per your suggestion still i'm getting the same warning.

    	tps65218: tps65218@24 {
    		reg = <0x24>;
    		compatible = "ti,tps65218";
    		interrupt-parent = <&gpio2>;
    		interrupts = <18 IRQ_TYPE_NONE>; /* gpio2 18 */
     		interrupt-controller;
     		#interrupt-cells = <2>;
    
    		regulators {
    			dcdc1_reg: regulator@0 {
    				regulator-name = "vdd_mpu";
    				compatible = "ti,tps65218-dcdc1";
    				regulator-min-microvolt = <912500>;
    				regulator-max-microvolt = <1351500>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			dcdc2_reg: regulator@1 {
    				regulator-name = "vdd_core";
    				compatible = "ti,tps65218-dcdc2";
    				regulator-min-microvolt = <912500>;
    				regulator-max-microvolt = <1150000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			dcdc3_reg: regulator@2 {
    				regulator-name = "vdds_ddr";
    				compatible = "ti,tps65218-dcdc3";
    				regulator-min-microvolt = <1283000>;
    				regulator-max-microvolt = <1418000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			dcdc4_reg: regulator@3 {
    				regulator-name = "vdd_3v3";
    				compatible = "ti,tps65218-dcdc4";
    				regulator-always-on;
    				regulator-min-microvolt = <3300000>;
    				regulator-max-microvolt = <3300000>;
    			};
    
    			dcdc5_reg: regulator@4 {
    				regulator-always-on;
    				compatible = "ti,tps65218-dcdc5";
    			};
    
    			dcdc6_reg: regulator@5 {
    				regulator-always-on;
    				compatible = "ti,tps65218-dcdc6";
    			};
    
    			ldo1_reg: regulator@6 {
    				regulator-name = "vdd_1v8";
    				compatible = "ti,tps65218-ldo1";
    				regulator-always-on;
    				regulator-min-microvolt = <1800000>;
    				regulator-max-microvolt = <1800000>;
    			};
    		};
    	};

  • Jigarp,

    "OF: ERROR: Bad of_node_put() on /ocp/i2c@44e0b000/tps65218@24"

    Is this message disappear when you remove below lines?

    - interrupt-parent = <&gpio2>;
    - interrupts = <18 IRQ_TYPE_NONE>; /* gpio2 18 */
    - interrupt-controller;
    - #interrupt-cells = <2>;


    Can you attach your whole DTS file for review?

    Regards,
    Pavel
  • While i remove those line it shows as per below

    [ 1.892345] tps65218 0-0024: Failed to request IRQ 0 for tps65218: -22 
    [ 1.899069] tps65218: probe of 0-0024 failed with error -22

    Here i've attached my dts file

    /*
     * Copyright (C) 2012 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.
     */
    
    /*
     * AM335x Starter Kit
     * http://www.ti.com/tool/tmdssk3358
     */
    
    /dts-v1/;
    
    #include "am33xx.dtsi"
    #include <dt-bindings/pwm/pwm.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/rtc/nxp,pcf85263.h>
    / {
    	model = "TI AM335x EVM-SK";
    	compatible = "ti,am335x-evmsk", "ti,am33xx";
    
    	cpus {
    		cpu@0 {
    			cpu0-supply = <&dcdc1_reg>;
    		};
    	};
    
    	memory@80000000 {
    		device_type = "memory";
    		reg = <0x80000000 0x20000000>; /* 512 MB */
    	};
    
    	chosen {
    		stdout-path = &uart0;
    	};
    
    	vbat: fixedregulator0 {
    		compatible = "regulator-fixed";
    		regulator-name = "vbat";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		regulator-boot-on;
    	};
    
    	vtt_fixed: fixedregulator1 {
    		compatible = "regulator-fixed";
    		regulator-name = "vtt";
    		regulator-min-microvolt = <1350000>;
    		regulator-max-microvolt = <1350000>;
    		gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
    		regulator-always-on;
    		regulator-boot-on;
    		enable-active-high;
    	};
    
    	v3v3_fixed: fixedregulator2 {
    		compatible = "regulator-fixed";
    		regulator-name = "3v3_fixed";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    	};
    
    	leds {
    		pinctrl-names = "default";
    		pinctrl-0 = <&led_pins_default>;
    		compatible = "gpio-leds";
    
    		led1 {
    			label = "fresca:green:heartbeat";
    			gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
    			linux,default-trigger = "heartbeat";
    			default-state = "off";
    		};
    	};
    
    	pwmleds {
    		compatible = "pwm-leds";
    
    		red_led {
    			label = "red_led";
    			pwm-names = "RED_LED";
    			pwms = <&ehrpwm1 0 50000 0>;
    			max-brightness = <255>;
    			brightness = <2>;
    			linux,default-trigger = "default-on";
    		};
    
    		green_led {
    			label = "green_led";
    			pwm-names = "GREEN_LED";
    			pwms = <&ehrpwm1 1 50000 0>;
    			max-brightness = <255>;
    			brightness = <2>;
    			linux,default-trigger = "default-on";
    		};
    
    		blue_led {
    			label = "blue_led";
    			pwm-names = "BLUE_LED";
    			pwms = <&ecap1 0 50000 0>;
    			max-brightness = <255>;
    			brightness = <2>;
    			linux,default-trigger = "default-on";
    		};
    	};
    
    	gpio_buttons: gpio_buttons0 {
    		compatible = "gpio-keys";
    		#address-cells = <1>;
    		#size-cells = <0>;
    
    		switch1 {
    			label = "button0";
    			linux,code = <0x100>;
    			gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
    		};
    	};
    
    	lcd_bl: backlight {
    		compatible = "pwm-backlight";
    		pwm-names = "TFT_BACKLIGHT";
    		pwms = <&ecap2 0 50000 PWM_POLARITY_INVERTED>;
    		/* 100 Brightness Levels Starts with 0 */
    		brightness-levels = <0 25 28 30 32 35 37 39 41 44 46 48 51 53 55 58 60 62 64 67 69 71 74 76 78 81 83 85 87 90 92 94 97 99 101 							104 106 108 110 113 115 117 120 122 124 127 129 131 133 136 138 140 143 145 147 150 152 154 156 159 161 							163 166 168 170 173 175 177 179 182 184 186 189 191 193 196 198 200 202 205 207 209 212 214 216 219 221 							223 225 228 230 232 235 237 239 242 244 246 249 252 255>;
    		default-brightness-level = <90>;
    	};
    
    	panel {
    		compatible = "ti,tilcdc,panel";
    		pinctrl-names = "default";
    		pinctrl-0 = <&tft_24_bit_pins_default>;
    		backlight = <&lcd_bl>;
    		enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
    		line-name = "LCDC_EN";
    		status = "okay";
    		panel-info {
    			ac-bias		= <255>;
    			ac-bias-intrpt	= <0>;
    			dma-burst-sz	= <16>;
    			bpp		= <32>;
    			fdd		= <0x80>;
    			sync-edge	= <0>;
    			sync-ctrl	= <1>;
    			raster-order	= <0>;
    			fifo-th		= <0>;
    		};
    		display-timings {
    			480x272 {
    				hactive		= <480>;
    				vactive		= <272>;
    				hback-porch	= <43>;
    				hfront-porch	= <8>;
    				hsync-len		= <4>;
    				vback-porch	= <12>;
    				vfront-porch	= <4>;
    				vsync-len		= <10>;
    				clock-frequency = <9000000>;
    				hsync-active	= <0>;
    				vsync-active	= <0>;
    			};
    		};
    	};
    };
    
    &am33xx_pinmux {
    	pinctrl-names = "default";
    	pinctrl-0 = <&gpio_keys &ddr3_vtt_toggle &bluetooth_enable_pin_default &i2c1_pins_default>;
    
    	gpio_keys: gpio_keys{
    		pinctrl-single,pins = <
    			0x60 ( PIN_INPUT | MUX_MODE7 ) /* (V16) gpmc_a8.gpio1[24] */
    			0x1b4 ( PIN_OUTPUT | MUX_MODE7 ) /* (D14) xdma_event_intr1.gpio0[20] */
    		>;
    	};
    
    	ddr3_vtt_toggle: ddr3_vtt_toggle {
    		pinctrl-single,pins = <
    			0x15c ( PIN_INPUT | MUX_MODE7 ) /* (A16) spi0_cs0.gpio0[5] */
    		>;
    	};
    
    	led_pins_default: led_pins_default{
    		pinctrl-single,pins = <
    			0x64 ( PIN_INPUT | MUX_MODE7 ) /* (U16) gpmc_a9.gpio1[25] */
    		>;
    	};
    
    	emmc_pins_default: emmc_pins_default {
    		pinctrl-single,pins = <
    			0x80 ( PIN_INPUT | MUX_MODE2 ) /* (U9) gpmc_csn1.mmc1_clk */
    			0x84 ( PIN_INPUT | MUX_MODE2 ) /* (V9) gpmc_csn2.mmc1_cmd */
    			0x0 ( PIN_INPUT | MUX_MODE1 ) /* (U7) gpmc_ad0.mmc1_dat0 */
    			0x4 ( PIN_INPUT | MUX_MODE1 ) /* (V7) gpmc_ad1.mmc1_dat1 */
    			0x8 ( PIN_INPUT | MUX_MODE1 ) /* (R8) gpmc_ad2.mmc1_dat2 */
    			0xc ( PIN_INPUT | MUX_MODE1 ) /* (T8) gpmc_ad3.mmc1_dat3 */
    			0x10 ( PIN_INPUT | MUX_MODE1 ) /* (U8) gpmc_ad4.mmc1_dat4 */
    			0x14 ( PIN_INPUT | MUX_MODE1 ) /* (V8) gpmc_ad5.mmc1_dat5 */
    			0x18 ( PIN_INPUT | MUX_MODE1 ) /* (R9) gpmc_ad6.mmc1_dat6 */
    			0x1c ( PIN_INPUT | MUX_MODE1 ) /* (T9) gpmc_ad7.mmc1_dat7 */
    		>;
    	};
    
    	sdmmc0_pins_default: sdmmc0_pins_default {
    		pinctrl-single,pins = <
    			0x100 ( PIN_INPUT | MUX_MODE0 ) /* (G17) mmc0_clk.mmc0_clk */
    			0x104 ( PIN_INPUT | MUX_MODE0 ) /* (G18) mmc0_cmd.mmc0_cmd */
    			0xfc ( PIN_INPUT | MUX_MODE0 ) /* (G16) mmc0_dat0.mmc0_dat0 */
    			0xf8 ( PIN_INPUT | MUX_MODE0 ) /* (G15) mmc0_dat1.mmc0_dat1 */
    			0xf4 ( PIN_INPUT | MUX_MODE0 ) /* (F18) mmc0_dat2.mmc0_dat2 */
    			0xf0 ( PIN_INPUT | MUX_MODE0 ) /* (F17) mmc0_dat3.mmc0_dat3 */
    			0x148 ( PIN_INPUT | MUX_MODE4 ) /* (M17) mdio_data.mmc0_sdcd */
    		>;
    	};
    
    	blower_pwm_pins_default: blower_pwm_pins_default {
    		pinctrl-single,pins = <
    			0x190 ( PIN_OUTPUT_PULLDOWN | MUX_MODE1 ) /* (A13) mcasp0_aclkx.ehrpwm0A */
    			0x194 ( PIN_OUTPUT_PULLDOWN | MUX_MODE1 ) /* (B13) mcasp0_fsx.ehrpwm0B */
    		>;
    	};
    
    	rgb_led_pwm_pins_default: rgb_led_pwm_pins_default {
    		pinctrl-single,pins = <
    			0x48 ( PIN_OUTPUT | MUX_MODE6 ) /* (U14) gpmc_a2.ehrpwm1A */
    			0x4c ( PIN_OUTPUT | MUX_MODE6 ) /* (T14) gpmc_a3.ehrpwm1B */
    		>;
    	};
    
    	pru0_gpio_pins_default: pru0_gpio_pins_default {
    		pinctrl-single,pins = <
    			0x198 ( PIN_OUTPUT | MUX_MODE5 ) /* (D12) mcasp0_axr0.pr1_pru0_pru_r30[2] */
    			0x1a0 ( PIN_OUTPUT | MUX_MODE5 ) /* (B12) mcasp0_aclkr.pr1_pru0_pru_r30[4] */
    			0x1a4 ( PIN_OUTPUT | MUX_MODE5 ) /* (C13) mcasp0_fsr.pr1_pru0_pru_r30[5] */
    			0x1ac ( PIN_OUTPUT | MUX_MODE5 ) /* (A14) mcasp0_ahclkx.pr1_pru0_pru_r30[7] */
    			0x1a8 ( PIN_INPUT | MUX_MODE6 ) /* (D13) mcasp0_axr1.pr1_pru0_pru_r31[6] */
    		>;
    	};
    
    	uart_debug_pins_default: uart_debug_pins_default {
    		pinctrl-single,pins = <
    			0x170 ( PIN_INPUT | MUX_MODE0 ) /* (E15) uart0_rxd.uart0_rxd */
    			0x174 ( PIN_OUTPUT | MUX_MODE0 ) /* (E16) uart0_txd.uart0_txd */
    			0x168 ( PIN_INPUT | MUX_MODE0 ) /* (E18) uart0_ctsn.uart0_ctsn */
    			0x16c ( PIN_OUTPUT | MUX_MODE0 ) /* (E17) uart0_rtsn.uart0_rtsn */
    		>;
    	};
    
    	bluetooth_enable_pin_default: bluetooth_enable_pin_default{
    		pinctrl-single,pins = <
    			0x58 ( PIN_OUTPUT | MUX_MODE7 ) /* (U15) gpmc_a6.gpio1[22] */
    		>;
    	};
    
    	bluetooth_pins_default: bluetooth_pins_default {
    		pinctrl-single,pins = <
    			0x180 ( PIN_INPUT | MUX_MODE0 ) /* (D16) uart1_rxd.uart1_rxd */
    			0x184 ( PIN_OUTPUT | MUX_MODE0 ) /* (D15) uart1_txd.uart1_txd */
    			0x178 ( PIN_INPUT | MUX_MODE0 ) /* (D18) uart1_ctsn.uart1_ctsn */
    			0x17c ( PIN_OUTPUT | MUX_MODE0 ) /* (D17) uart1_rtsn.uart1_rtsn */
    		>;
    	};
    
    	rtc0_pins_default: rtc0_pins_default {
    		pinctrl-single,pins = <
    			0x1f8 ( PIN_INPUT | MUX_MODE0 ) /* (B5) RTC_PORz.RTC_PORz */
    			0x200 ( PIN_OUTPUT | MUX_MODE0 ) /* (C5) EXT_WAKEUP.EXT_WAKEUP */
    			0x1fc ( PIN_INPUT | MUX_MODE0 ) /* (C6) PMIC_POWER_EN.PMIC_POWER_EN */
    			0x204 ( PIN_INPUT | MUX_MODE0 ) /* (B4) ENZ_KALDO_1P8V.ENZ_KALDO_1P8V */
    		>;
    	};
    
    	spi0_pins_default: spi0_pins_default {
    		pinctrl-single,pins = <
    			0x150 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (A17) spi0_sclk.spi0_sclk */
    			0x154 ( PIN_OUTPUT | MUX_MODE0 ) /* (B17) spi0_d0.spi0_d0 */
    			0x158 ( PIN_INPUT | MUX_MODE0 ) /* (B16) spi0_d1.spi0_d1 */
    		>;
    	};
    
    	edt_ft5x06_ts_pins_default: edt_ft5x06_ts_pins_default{
    		pinctrl-single,pins = <
    			0x54 ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* (V15) gpmc_a5.gpio1[21] */
    			0x70 ( PIN_INPUT | MUX_MODE7 ) /* (T17) gpmc_wait0.gpio0[30] */
    		>;
    	};
    
    	gpio0_pins_default: gpio0_pins_default {
    		pinctrl-single,pins = <
    			0x11c ( PIN_INPUT | MUX_MODE7 ) /* (J18) gmii1_txd3.gpio0[16] */
    			0x1b0 ( PIN_INPUT | MUX_MODE7 ) /* (A15) xdma_event_intr0.gpio0[19] */
    			0x124 ( PIN_INPUT | MUX_MODE7 ) /* (K16) gmii1_txd1.gpio0[21] */
    			0x128 ( PIN_INPUT | MUX_MODE7 ) /* (K17) gmii1_txd0.gpio0[28] */
    			0x144 ( PIN_INPUT | MUX_MODE7 ) /* (H18) rmii1_refclk.gpio0[29] */
    			0x74 ( PIN_INPUT | MUX_MODE7 ) /* (U17) gpmc_wpn.gpio0[31] */
    		>;
    	};
    
    	gpio1_pins_default: gpio1_pins_default {
    		pinctrl-single,pins = <
    			0x40 ( PIN_INPUT | MUX_MODE7 ) /* (R13) gpmc_a0.gpio1[16] */
    			0x44 ( PIN_INPUT | MUX_MODE7 ) /* (V14) gpmc_a1.gpio1[17] */
    			0x68 ( PIN_INPUT | MUX_MODE7 ) /* (T16) gpmc_a10.gpio1[26] */
    			0x6c ( PIN_INPUT | MUX_MODE7 ) /* (V17) gpmc_a11.gpio1[27] */
    			0x78 ( PIN_INPUT | MUX_MODE7 ) /* (U18) gpmc_be1n.gpio1[28] */
    		>;
    	};
    
    	gpio2_pins_default: gpio2_pins_default {
    		pinctrl-single,pins = <
    			0x98 ( PIN_INPUT | MUX_MODE7 ) /* (U6) gpmc_wen.gpio2[4] */
    			0x9c ( PIN_INPUT | MUX_MODE7 ) /* (T6) gpmc_be0n_cle.gpio2[5] */
    			0x134 ( PIN_INPUT | MUX_MODE7 ) /* (L17) gmii1_rxd3.gpio2[18] */
    		>;
    	};
    
    	gpio3_pins_default: gpio3_pins_default {
    		pinctrl-single,pins = <
    			0x12c ( PIN_INPUT | MUX_MODE7 ) /* (K18) gmii1_txclk.gpio3[9] */
    		>;
    	};
    
    	rgb_blue_pwm_pins_default: rgb_blue_pwm_pins_default {
    		pinctrl-single,pins = <
    			0x160 ( PIN_OUTPUT | MUX_MODE2 ) /* (C15) spi0_cs1.eCAP1_in_PWM1_out */
    		>;
    	};
    
    	lcd_backlight_pwm_pins_default: lcd_backlight_pwm_pins_default {
    		pinctrl-single,pins = <
    			0x19c ( PIN_OUTPUT | MUX_MODE4 ) /* (C12) mcasp0_ahclkr.eCAP2_in_PWM2_out */
    		>;
    	};
    
    	i2c0_pins_default: i2c0_pins_default {
    		pinctrl-single,pins = <
    			0x18c ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (C16) I2C0_SCL.I2C0_SCL */
    			0x188 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (C17) I2C0_SDA.I2C0_SDA */
    		>;
    	};
    
    	i2c1_pins_default: i2c1_pins_default {
    		pinctrl-single,pins = <
    			0x110 ( PIN_INPUT | MUX_MODE3 ) /* (J15) gmii1_rxer.I2C1_SCL */
    			0x10c ( PIN_INPUT | MUX_MODE3 ) /* (H17) gmii1_crs.I2C1_SDA */
    		>;
    	};
    
    	tft_24_bit_pins_default: tft_24_bit_pins_default {
    		pinctrl-single,pins = <
    			0xe0 ( PIN_OUTPUT | MUX_MODE0 ) /* (U5) lcd_vsync.lcd_vsync */
    			0xe4 ( PIN_OUTPUT | MUX_MODE0 ) /* (R5) lcd_hsync.lcd_hsync */
    			0xe8 ( PIN_OUTPUT | MUX_MODE0 ) /* (V5) lcd_pclk.lcd_pclk */
    			0xec ( PIN_OUTPUT | MUX_MODE0 ) /* (R6) lcd_ac_bias_en.lcd_ac_bias_en */
    			0xa0 ( PIN_OUTPUT | MUX_MODE0 ) /* (R1) lcd_data0.lcd_data0 */
    			0xa4 ( PIN_OUTPUT | MUX_MODE0 ) /* (R2) lcd_data1.lcd_data1 */
    			0xa8 ( PIN_OUTPUT | MUX_MODE0 ) /* (R3) lcd_data2.lcd_data2 */
    			0xac ( PIN_OUTPUT | MUX_MODE0 ) /* (R4) lcd_data3.lcd_data3 */
    			0xb0 ( PIN_OUTPUT | MUX_MODE0 ) /* (T1) lcd_data4.lcd_data4 */
    			0xb4 ( PIN_OUTPUT | MUX_MODE0 ) /* (T2) lcd_data5.lcd_data5 */
    			0xb8 ( PIN_OUTPUT | MUX_MODE0 ) /* (T3) lcd_data6.lcd_data6 */
    			0xbc ( PIN_OUTPUT | MUX_MODE0 ) /* (T4) lcd_data7.lcd_data7 */
    			0xc0 ( PIN_OUTPUT | MUX_MODE0 ) /* (U1) lcd_data8.lcd_data8 */
    			0xc4 ( PIN_OUTPUT | MUX_MODE0 ) /* (U2) lcd_data9.lcd_data9 */
    			0xc8 ( PIN_OUTPUT | MUX_MODE0 ) /* (U3) lcd_data10.lcd_data10 */
    			0xcc ( PIN_OUTPUT | MUX_MODE0 ) /* (U4) lcd_data11.lcd_data11 */
    			0xd0 ( PIN_OUTPUT | MUX_MODE0 ) /* (V2) lcd_data12.lcd_data12 */
    			0xd4 ( PIN_OUTPUT | MUX_MODE0 ) /* (V3) lcd_data13.lcd_data13 */
    			0xd8 ( PIN_OUTPUT | MUX_MODE0 ) /* (V4) lcd_data14.lcd_data14 */
    			0xdc ( PIN_OUTPUT | MUX_MODE0 ) /* (T5) lcd_data15.lcd_data15 */
    			0x3c ( PIN_OUTPUT | MUX_MODE1 ) /* (U13) gpmc_ad15.lcd_data16 */
    			0x38 ( PIN_OUTPUT | MUX_MODE1 ) /* (V13) gpmc_ad14.lcd_data17 */
    			0x34 ( PIN_OUTPUT | MUX_MODE1 ) /* (R12) gpmc_ad13.lcd_data18 */
    			0x30 ( PIN_OUTPUT | MUX_MODE1 ) /* (T12) gpmc_ad12.lcd_data19 */
    			0x2c ( PIN_OUTPUT | MUX_MODE1 ) /* (U12) gpmc_ad11.lcd_data20 */
    			0x28 ( PIN_OUTPUT | MUX_MODE1 ) /* (T11) gpmc_ad10.lcd_data21 */
    			0x24 ( PIN_OUTPUT | MUX_MODE1 ) /* (T10) gpmc_ad9.lcd_data22 */
    			0x20 ( PIN_OUTPUT | MUX_MODE1 ) /* (U10) gpmc_ad8.lcd_data23 */
    		>;
    	};
    
    	blower_rpm_feedback_pins_default: blower_rpm_feedback_pins_default {
    		pinctrl-single,pins = <
    			0x164 ( PIN_INPUT | MUX_MODE3 ) /* (C18) eCAP0_in_PWM0_out.pr1_ecap0_ecap_capin_apwm_o */
    		>;
    	};
    
    };
    
    &gpio0 {
    	status = "okay";
    	ti,no-reset-on-init;
    
    	pushbutton_in {
    		gpio-hog;
    		gpios = <20 GPIO_ACTIVE_LOW>;
    		output-low;
    		line-name = "pushbutton_in";
    	};
    };
    
    &gpio1 {
    	status = "okay";
    };
    
    &gpio2 {
    	status = "okay";
    };
    
    &uart0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart_debug_pins_default>;
    	status = "okay";
    };
    
    &uart1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&bluetooth_pins_default>;
    	status = "okay";
    };
    
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    
    &i2c0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&i2c0_pins_default>;
    	status = "okay";
    	clock-frequency = <400000>;
    
    	tps65218: tps65218@24 {
    		reg = <0x24>;
    		compatible = "ti,tps65218";
    		interrupt-parent = <&gpio2>;
    		interrupts = <18 IRQ_TYPE_NONE>; /* gpio2 18 */
    /*		interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>;	*/
     		interrupt-controller;
     		#interrupt-cells = <2>;
    
    		regulators {
    			dcdc1_reg: regulator@0 {
    				/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
    				regulator-name = "vdd_mpu";
    				compatible = "ti,tps65218-dcdc1";
    				regulator-min-microvolt = <912500>;
    				regulator-max-microvolt = <1351500>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			dcdc2_reg: regulator@1 {
    				/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
    				regulator-name = "vdd_core";
    				compatible = "ti,tps65218-dcdc2";
    				regulator-min-microvolt = <912500>;
    				regulator-max-microvolt = <1150000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			dcdc3_reg: regulator@2 {
    				/* VDDS_DDR voltage limits 1.35V with +/-4% tolerance */
    				regulator-name = "vdds_ddr";
    				compatible = "ti,tps65218-dcdc3";
    				regulator-min-microvolt = <1283000>;
    				regulator-max-microvolt = <1418000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			dcdc4_reg: regulator@3 {
    				/* VDDS_SYSTEM_33 voltage 3.3v */
    				regulator-name = "vdd_3v3";
    				compatible = "ti,tps65218-dcdc4";
    				regulator-always-on;
    				regulator-min-microvolt = <3300000>;
    				regulator-max-microvolt = <3300000>;
    			};
    
    			dcdc5_reg: regulator@4 {
    				regulator-always-on;
    				compatible = "ti,tps65218-dcdc5";
    			};
    
    			dcdc6_reg: regulator@5 {
    				regulator-always-on;
    				compatible = "ti,tps65218-dcdc6";
    			};
    
    			ldo1_reg: regulator@6 {
    				/* VDDS_SYSTEM_18 voltage 1.8v */
    				regulator-name = "vdd_1v8";
    				compatible = "ti,tps65218-ldo1";
    				regulator-always-on;
    				regulator-min-microvolt = <1800000>;
    				regulator-max-microvolt = <1800000>;
    			};
    		};
    	};
    
    	polytouch: edt-ft5x06@38 {
    		status = "okay";
    		compatible = "edt,edt-ft5306","edt,edt-ft5x06";
    		reg = <0x38>;
    		pinctrl-names = "default";
    		pinctrl-0 = <&edt_ft5x06_ts_pins_default>;
    		interrupt-parent=<&gpio0>;
    		interrupts = <30 IRQ_TYPE_EDGE_RISING>;
    		reset-gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
    		/*wake-gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;*/
    		touchscreen-size-x = <480>;
    		touchscreen-size-y = <272>;
    	};
    
    	eeprom@50 {
    		compatible = "atmel,24c256";
    		reg = <0x50>;
    		pagesize = <64>;
    	};
    
    	light_Sensor: opt3001@44 {
    		compatible = "ti,opt3001";
    		reg = <0x44>;
    		interrupt-parent = <&gpio0>;
    		interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
    		#io-channel-cells = <0>;
    	};
    
    	rtc@51 {
    		compatible = "nxp,pcf85263"; 
    		reg = <0x51>; 
    		interrupt-parent = <&gpio2>; 
    		interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 
    		interrupt-names = "INTB"; 
    		quartz-load-capacitance = <PCF85263_QUARTZCAP_7pF>; 
    		quartz-drive-strength = <PCF85263_QUARTZDRIVE_LOW>; 
    	};
    
    };
    
    /*&i2c1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&i2c1_pins_default>;
    
    	status = "okay";
    	clock-frequency = <100000>;
    };*/
    
    &spi0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&spi0_pins_default>;
    	status = "okay";
    	ti,pindir-d0-out-d1-in = <1>;
    	spi-3wire;
    
    	mcp3x0x@0{
    		compatible = "microchip,mcp3204";
    		reg = <0>;
    		spi-max-frequency = <500000>;
    		vref-supply = <&v3v3_fixed>;
    	};
    };
    
    &cppi41dma  {
    	status = "okay";
    };
    
    /*
    &epwmss0 {
    	status = "okay";
    
    	ehrpwm0: pwm@48300200 {
    		status = "okay";
    		pinctrl-names = "default";
    		pinctrl-0 = <&blower_pwm_pins_default>;
    		pwm-names = "blower_control";
    	};
    };
    */
    
    &epwmss1 {
    	status = "okay";
    
    	ecap1: ecap@48302100 {
    		status = "okay";
    		pinctrl-names = "default";
    		pinctrl-0 = <&rgb_blue_pwm_pins_default>;
    		pwm-names = "blue_led";
    	};
    
    	ehrpwm1: pwm@48302200 {
    		status = "okay";
    		pinctrl-names = "default";
    		pinctrl-0 = <&rgb_led_pwm_pins_default>;
    		pwm-names = "green_red_led";
    	};
    };
    
    &epwmss2 {
    	status = "okay";
    
    	ecap2: ecap@48304100 {
    		status = "okay";
    		pinctrl-names = "default";
    		pinctrl-0 = <&lcd_backlight_pwm_pins_default>;
    	};
    };
    
    &wkup_m3_ipc {
    	ti,needs-vtt-toggle;
    	ti,vtt-gpio-pin = <5>;
    	ti,scale-data-fw = "am335x-evm-scale-data.bin";
    };
    
    &mmc1 {
    	status = "okay";
    	vmmc-supply = <&v3v3_fixed>;
    	bus-width = <4>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&sdmmc0_pins_default>;
    	cd-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
    	disable-wp;
    };
    
    &mmc2 {
    	status = "okay";
    	vmmc-supply = <&v3v3_fixed>;
    	bus-width = <8>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&emmc_pins_default>;
    	ti,non-removable;
    	disable-wp;
    	broken-cd;
    };
    
    &sham {
    	status = "okay";
    };
    
    &aes {
    	status = "okay";
    };
    
    &lcdc {
    	status = "okay";
    	blue-and-red-wiring = "crossed";
    };
    
    &sgx {
    	status = "okay";
    };
    
    &rtc {
    	clocks = <&clk_32768_ck>, <&clkdiv32k_ick>;
    	clock-names = "ext-clk", "int-clk";
    	system-power-controller;
    };
    
    &pruss_soc_bus {
    	status = "okay";
    
    	pruss: pruss@4a300000 {
    		status = "okay";
    
    		pru0: pru@4a334000 {
    			pinctrl-names = "default";
    			pinctrl-0 = <&pru0_gpio_pins_default>;
    			status = "okay";
    		};
    
    		pru1: pru@4a338000 {
    			status = "okay";
    			pinctrl-names = "default";
    			pinctrl-0 = <&blower_rpm_feedback_pins_default>;
    		};
    	};
    };
    

  • Jigarp,

    Can you try to replace IRQ_TYPE_NONE with IRQ_TYPE_LEVEL_HIGH. Is there any difference?

    If no, then most probably GPIO interrupt is not supported by SW and you should use NMI instead.

    When checking am57xx-beagle-x15-common.dtsi, I see GPIO is supported for tps659038:

    linux-kernel/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
    linux-kernel/Documentation/devicetree/bindings/mfd/palmas.txt

    While for tps65218 only NMI is implemented:

    linux-kernel/arch/arm/boot/dts/am437x-gp-evm.dts
    linux-kernel/Documentation/devicetree/bindings/regulator/tps65218.txt

    Regards,
    Pavel
  • While i'm changing IRQ_TYPE_LEVEL_HIGH it show 

    [   21.839227] irq 111: nobody cared (try booting with the "irqpoll" option)    
    [   21.846741] handlers:                                                        
    [   21.849031] [<c01687c4>] irq_default_primary_handler threaded [<c04f1650>] regmap_irq_thread                                                                 
    [   21.857534] Disabling IRQ #111                                               
    [   21.864175] OF: ERROR: Bad of_node_put() on /ocp/i2c@44e0b000/tps65218@24  

    At one of your post you have suggested to use gpio instead of NMI

    e2e.ti.com/.../672517

  • Jigarp,

    Yes, changing from NMI to GPIO is supported by HW, refer to the below pointers:

    www.ti.com/.../tps65218.pdf
    Figure 6-3. Typical Application Schematic


    www.ti.com/.../slvuaa9a.pdf
    Figure 1. Connection Diagram for TPS65218 and AM335x

    The problem seems to be SW related, this change is not supported by current SW:

    e2e.ti.com/.../632345

    Regards,
    Pavel