Loading Documentation/devicetree/bindings/leds/Nxp-ledseg.txt 0 → 100644 +55 −0 Original line number Diff line number Diff line NXP LED segment driver devicetree bindings Required properties: - compatible : "nxp,pca9956b" for PCA9956b - nxp,mode1 : MODE1 register - nxp,mode2 : MODE2 register - nxp,ledout0~5 : LED output state registers - nxp,defaultiref : LED output gain control default value LED sub-node properties: - reg: number of LED line, 0 to 24 - label: (optional) name of LED - linux,default-trigger : (optional) Example: pca9956b { /* I2C version */ reg = <0x7d>; /* nxp-ledseg properties */ compatible = "nxp,pca9956b"; pinctrl-names = "default"; pinctrl-0 = <&pca9956b_pins>; 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 = "ledsec1_b"; reg = <0x0>; }; out1@1 { label = "ledsec1_g"; reg = <0x1>; }; out5@5 { label = "ledsec1_g"; reg = <0x5>; linux,default_trigger = "heartbeat"; }; }; arch/arm64/boot/dts/qcom/qcs405-led-pca9956.dtsi 0 → 100644 +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>; }; }; }; arch/arm64/boot/dts/qcom/qcs405-pinctrl.dtsi +15 −0 Original line number Diff line number Diff line Loading @@ -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 { Loading arch/arm64/boot/dts/qcom/qcs405.dtsi +26 −0 Original line number Diff line number Diff line Loading @@ -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"; }; }; drivers/leds/Kconfig +9 −0 Original line number Diff line number Diff line Loading @@ -406,6 +406,15 @@ config LEDS_PCA963X LED driver chip accessed via the I2C bus. Supported devices include PCA9633 and PCA9634 config LEDS_PCA9956B tristate "LED support for PCA9956B I2C chip" depends on LEDS_CLASS depends on I2C help This option enables support for LEDs connected to the PCA9956B LED driver chip accessed via the I2C bus. Supported devices include PCA9956B config LEDS_QPNP_FLASH_V2 tristate "Support for QPNP V2 Flash LEDs" depends on LEDS_CLASS && MFD_SPMI_PMIC Loading Loading
Documentation/devicetree/bindings/leds/Nxp-ledseg.txt 0 → 100644 +55 −0 Original line number Diff line number Diff line NXP LED segment driver devicetree bindings Required properties: - compatible : "nxp,pca9956b" for PCA9956b - nxp,mode1 : MODE1 register - nxp,mode2 : MODE2 register - nxp,ledout0~5 : LED output state registers - nxp,defaultiref : LED output gain control default value LED sub-node properties: - reg: number of LED line, 0 to 24 - label: (optional) name of LED - linux,default-trigger : (optional) Example: pca9956b { /* I2C version */ reg = <0x7d>; /* nxp-ledseg properties */ compatible = "nxp,pca9956b"; pinctrl-names = "default"; pinctrl-0 = <&pca9956b_pins>; 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 = "ledsec1_b"; reg = <0x0>; }; out1@1 { label = "ledsec1_g"; reg = <0x1>; }; out5@5 { label = "ledsec1_g"; reg = <0x5>; linux,default_trigger = "heartbeat"; }; };
arch/arm64/boot/dts/qcom/qcs405-led-pca9956.dtsi 0 → 100644 +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>; }; }; };
arch/arm64/boot/dts/qcom/qcs405-pinctrl.dtsi +15 −0 Original line number Diff line number Diff line Loading @@ -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 { Loading
arch/arm64/boot/dts/qcom/qcs405.dtsi +26 −0 Original line number Diff line number Diff line Loading @@ -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"; }; };
drivers/leds/Kconfig +9 −0 Original line number Diff line number Diff line Loading @@ -406,6 +406,15 @@ config LEDS_PCA963X LED driver chip accessed via the I2C bus. Supported devices include PCA9633 and PCA9634 config LEDS_PCA9956B tristate "LED support for PCA9956B I2C chip" depends on LEDS_CLASS depends on I2C help This option enables support for LEDs connected to the PCA9956B LED driver chip accessed via the I2C bus. Supported devices include PCA9956B config LEDS_QPNP_FLASH_V2 tristate "Support for QPNP V2 Flash LEDs" depends on LEDS_CLASS && MFD_SPMI_PMIC Loading