Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4b5eda8 authored by Prashanth Vadde's avatar Prashanth Vadde Committed by Gerrit - the friendly Code Review server
Browse files

ARM: dts: msm: Support PCA9956B LED on QCS405



Add PCA9956B LED interface node support on
QCS405 platform.

Change-Id: I12503ed3c21549c6e569a4603371c08ce6ca911b
Signed-off-by: default avatarPrashanth Vadde <pvadde@codeaurora.org>
parent e902c784
Loading
Loading
Loading
Loading
+247 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018, The Linux Foundation. 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 version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * 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.
 */

&i2c_2 {
	status = "ok";
	qcom,clk-freq-out = <100000>;

	/* PCA9956B LED Drivers */
	nxp-ledseg-i2c@65 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "nxp,pca9956b";
		reg = <0x65>;
		pca9956b,support_initialize = <1>;
		pca9956b,mode1 = <0x09>;
		pca9956b,mode2 = <0x05>;

		pca9956b,ledout0 = <0xAA>;
		pca9956b,ledout1 = <0xAA>;
		pca9956b,ledout2 = <0xAA>;
		pca9956b,ledout3 = <0xFF>;
		pca9956b,ledout4 = <0xFF>;
		pca9956b,ledout5 = <0xFF>;
		pca9956b,defaultiref = <0x2f>;
		out0@0 {
			label = "ledsec5_b";
			reg = <0x0>;
		};
		out1@1 {
			label = "ledsec5_g";
			reg = <0x1>;
		};
		out2@2 {
			label = "ledsec5_r";
			reg = <0x2>;
		};
		out3@3 {
			label = "ledsec6_b";
			reg = <0x3>;
		};
		out4@4 {
			label = "ledsec6_g";
			reg = <0x4>;
		};
		out5@5 {
			label = "ledsec6_r";
			reg = <0x5>;
		};
		out6@6 {
			label = "ledsec7_b";
			reg = <0x6>;
		};
		out7@7 {
			label = "ledsec7_g";
			reg = <0x7>;
		};
		out8@8 {
			label = "ledsec7_r";
			reg = <0x8>;
		};
		out9@9 {
			label = "ledsec8_b";
			reg = <0x9>;
		};
		out10@10 {
			label = "ledsec8_g";
			reg = <0xA>;
		};
		out11@11 {
			label = "ledsec8_r";
			reg = <0xB>;
		};
		out12@12 {
			label = "ledsec1_b";
			reg = <0xC>;
		};
		out13@13 {
			label = "ledsec1_g";
			reg = <0xD>;
		};
		out14@14 {
			label = "ledsec1_r";
			reg = <0xE>;
		};
		out15@15 {
			label = "ledsec2_b";
			reg = <0xF>;
		};
		out16@16 {
			label = "ledsec2_g";
			reg = <0x10>;
		};
		out17@17 {
			label = "ledsec2_r";
			reg = <0x11>;
		};
		out18@18 {
			label = "ledsec3_b";
			reg = <0x12>;
		};
		out19@19 {
			label = "ledsec3_g";
			reg = <0x13>;
		};
		out20@20 {
			label = "ledsec3_r";
			reg = <0x14>;
		};
		out21@21 {
			label = "ledsec4_b";
			reg = <0x15>;
		};
		out22@22 {
			label = "ledsec4_g";
			reg = <0x16>;
		};
		out23@23 {
			label = "ledsec4_r";
			reg = <0x17>;
		};
	};

	nxp-ledseg-i2c@69 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "nxp,pca9956b";
		reg = <0x69>;
		pca9956b,support_initialize = <1>;
		pca9956b,mode1 = <0x09>;
		pca9956b,mode2 = <0x05>;

		pca9956b,ledout0 = <0xAA>;
		pca9956b,ledout1 = <0xAA>;
		pca9956b,ledout2 = <0xAA>;
		pca9956b,ledout3 = <0xFF>;
		pca9956b,ledout4 = <0xFF>;
		pca9956b,ledout5 = <0xFF>;
		pca9956b,defaultiref = <0x2f>;
		out0@0 {
			label = "ledsec9_b";
			reg = <0x0>;
		};
		out1@1 {
			label = "ledsec9_g";
			reg = <0x1>;
		};
		out2@2 {
			label = "ledsec9_r";
			reg = <0x2>;
		};
		out3@3 {
			label = "ledsec10_b";
			reg = <0x3>;
		};
		out4@4 {
			label = "ledsec10_g";
			reg = <0x4>;
		};
		out5@5 {
			label = "ledsec10_r";
			reg = <0x5>;
		};
		out6@6 {
			label = "ledsec11_b";
			reg = <0x6>;
		};
		out7@7 {
			label = "ledsec11_g";
			reg = <0x7>;
		};
		out8@8 {
			label = "ledsec11_r";
			reg = <0x8>;
		};
		out9@9 {
			label = "ledsec12_b";
			reg = <0x9>;
		};
		out10@10 {
			label = "ledsec12_g";
			reg = <0xA>;
		};
		out11@11 {
			label = "ledsec12_r";
			reg = <0xB>;
		};
		out12@12 {
			label = "ledsec13_b";
			reg = <0xC>;
		};
		out13@13 {
			label = "ledsec13_g";
			reg = <0xD>;
		};
		out14@14 {
			label = "ledsec13_r";
			reg = <0xE>;
		};
		out15@15 {
			label = "ledsec14_b";
			reg = <0xF>;
		};
		out16@16 {
			label = "ledsec14_g";
			reg = <0x10>;
		};
		out17@17 {
			label = "ledsec14_r";
			reg = <0x11>;
		};
		out18@18 {
			label = "ledsec15_b";
			reg = <0x12>;
		};
		out19@19 {
			label = "ledsec15_g";
			reg = <0x13>;
		};
		out20@20 {
			label = "ledsec15_r";
			reg = <0x14>;
		};
		out21@21 {
			label = "ledsec16_b";
			reg = <0x15>;
		};
		out22@22 {
			label = "ledsec16_g";
			reg = <0x16>;
		};
		out23@23 {
			label = "ledsec16_r";
			reg = <0x17>;
		};
	};
};
+15 −0
Original line number Diff line number Diff line
@@ -1160,6 +1160,21 @@
				};
			};
		};

		pca9956b_reset_gpio: pca9956b_reset_gpio {
			mux {
				pins = "gpio95";
				function = "gpio";
			};

			config {
				pins = "gpio95";
				drive-strength = <2>;
				bias-pull-up;
				output-high;
			};
		};

		sec_mi2s_sck {
			sec_mi2s_sck_sleep: sec_mi2s_sck_sleep {
				mux {
+26 −0
Original line number Diff line number Diff line
@@ -1441,3 +1441,29 @@
	extcon = <&usb3_extcon>;
};

#include "qcs405-led-pca9956.dtsi"

&soc {
	i2c_2: i2c@78b6000 { /* BLSP1 QUP2 */
		compatible = "qcom,i2c-msm-v2";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x78b6000  0x600>;
		reg-names = "qup_phys_addr";
		interrupt-names = "qup_irq";
		interrupts = <0 96 0>;
		dmas = <&dma_blsp1 10 64 0x20000020 0x20>,
			<&dma_blsp1 11 32 0x20000020 0x20>;
		dma-names = "tx", "rx";
		qcom,master-id = <86>;
		qcom,clk-freq-out = <400000>;
		qcom,clk-freq-in  = <19200000>;
		clock-names = "iface_clk", "core_clk";
		clocks = <&clock_gcc GCC_BLSP1_AHB_CLK>,
			<&clock_gcc GCC_BLSP1_QUP1_I2C_APPS_CLK>;
		pinctrl-names = "i2c_active", "i2c_sleep";
		pinctrl-0 = <&i2c_2_active &pca9956b_reset_gpio>;
		pinctrl-1 = <&i2c_2_sleep>;
		status = "ok";
	};
};