OSDN Git Service

ARM: dts: ux500: Add Flash LEDs to Samsung phones
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 1 Feb 2021 09:13:08 +0000 (10:13 +0100)
committerArnd Bergmann <arnd@arndb.de>
Tue, 2 Feb 2021 17:00:04 +0000 (18:00 +0100)
This adds the Richtek RT8515 Flash LED to the Golden,
Skomer and Janice device trees.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210201091308.284465-1-linus.walleij@linaro.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/boot/dts/ste-ux500-samsung-golden.dts
arch/arm/boot/dts/ste-ux500-samsung-janice.dts
arch/arm/boot/dts/ste-ux500-samsung-skomer.dts

index 00ee013..7010fdc 100644 (file)
@@ -5,6 +5,7 @@
 #include "ste-ab8505.dtsi"
 #include "ste-dbx5x0-pinctrl.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 
                };
        };
 
+       /* Richtek RT8515GQW Flash LED Driver IC */
+       flash {
+               compatible = "richtek,rt8515";
+               /* GPIO 140 */
+               enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
+               /* GPIO 141 */
+               ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
+               /*
+                * RFS is 16 kOhm and RTS is 100 kOhm giving
+                * the flash max current 343mA and torch max
+                * current 55 mA.
+                */
+               richtek,rfs-ohms = <16000>;
+               richtek,rts-ohms = <100000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_flash_default_mode>;
+
+               led {
+                       function = LED_FUNCTION_FLASH;
+                       color = <LED_COLOR_ID_WHITE>;
+                       flash-max-timeout-us = <250000>;
+                       flash-max-microamp = <343750>;
+                       led-max-microamp = <55000>;
+               };
+       };
+
        vibrator {
                compatible = "gpio-vibrator";
                /* GPIO195 (MOT_EN) */
                };
        };
 
+       flash {
+               gpio_flash_default_mode: flash_default {
+                       golden_cfg1 {
+                               pins = "GPIO140_B11", "GPIO141_C12";
+                               ste,config = <&gpio_out_lo>;
+                       };
+               };
+       };
+
        i2c-gpio-1 {
                i2c_gpio_1_default: i2c_gpio_1 {
                        golden_cfg1 {
index 95d5abe..7411bfe 100644 (file)
@@ -8,6 +8,7 @@
 #include "ste-ab8500.dtsi"
 #include "ste-dbx5x0-pinctrl.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 
                };
        };
 
+       /* Richtek RT8515GQW Flash LED Driver IC */
+       flash {
+               compatible = "richtek,rt8515";
+               /* GPIO 140 */
+               enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
+               /* GPIO 141 */
+               ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
+               /*
+                * RFS is 16 kOhm and RTS is 100 kOhm giving
+                * the flash max current 343mA and torch max
+                * current 55 mA.
+                */
+               richtek,rfs-ohms = <16000>;
+               richtek,rts-ohms = <100000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_flash_default_mode>;
+
+               led {
+                       function = LED_FUNCTION_FLASH;
+                       color = <LED_COLOR_ID_WHITE>;
+                       flash-max-timeout-us = <250000>;
+                       flash-max-microamp = <343750>;
+                       led-max-microamp = <55000>;
+               };
+       };
+
        /* Bit-banged I2C on GPIO143 and GPIO144 also called "SUBPMU I2C" */
        i2c-gpio-0 {
                compatible = "i2c-gpio";
                        };
                };
        };
+       /* Flash and torch */
+       flash {
+               gpio_flash_default_mode: flash_default {
+                       janice_cfg1 {
+                               pins = "GPIO140_B11", "GPIO141_C12";
+                               ste,config = <&gpio_out_lo>;
+                       };
+               };
+       };
        /* GPIO keys */
        gpio-keys {
                gpio_keys_default_mode: gpio_keys_default {
index 3642049..d28a007 100644 (file)
@@ -8,6 +8,7 @@
 #include "ste-ab8505.dtsi"
 #include "ste-dbx5x0-pinctrl.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 
                pinctrl-0 = <&gpio_backlight_default_mode>;
        };
 
+       /* Richtek RT8515GQW Flash LED Driver IC */
+       flash {
+               compatible = "richtek,rt8515";
+               /* GPIO 140 */
+               enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
+               /* GPIO 141 */
+               ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
+               /*
+                * RFS is 16 kOhm and RTS is 100 kOhm giving
+                * the flash max current 343mA and torch max
+                * current 55 mA.
+                */
+               richtek,rfs-ohms = <16000>;
+               richtek,rts-ohms = <100000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_flash_default_mode>;
+
+               led {
+                       function = LED_FUNCTION_FLASH;
+                       color = <LED_COLOR_ID_WHITE>;
+                       flash-max-timeout-us = <250000>;
+                       flash-max-microamp = <343750>;
+                       led-max-microamp = <55000>;
+               };
+       };
+
        i2c-gpio-0 {
                compatible = "i2c-gpio";
                sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
                        };
                };
        };
+       flash {
+               gpio_flash_default_mode: flash_default {
+                       skomer_cfg1 {
+                               pins = "GPIO140_B11", "GPIO141_C12";
+                               ste,config = <&gpio_out_lo>;
+                       };
+               };
+       };
        /* GPIO that enables the 2.9V SD card level translator */
        sd-level-translator {
                sd_level_translator_default: sd_level_translator_default {