From 02c2455e92613864fdc516a1773dfa0f0a06db6e Mon Sep 17 00:00:00 2001 From: Baolin Wang Date: Mon, 23 Jul 2018 14:10:16 +0800 Subject: [PATCH 1/5] arm64: dts: sprd: Add SC27XX breathing light controller device The SC27xx breathing light controller can support 3 outputs: red LED, green LED and blue LED. Signed-off-by: Baolin Wang Signed-off-by: Olof Johansson --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index 98d3b4fdb9ad..7d53ca6b4ecc 100644 --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi @@ -17,6 +17,28 @@ #address-cells = <1>; #size-cells = <0>; + led-controller@200 { + compatible = "sprd,sc27xx-bltc", "sprd,sc2731-bltc"; + reg = <0x200>; + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + label = "red"; + reg = <0x0>; + }; + + led@1 { + label = "green"; + reg = <0x1>; + }; + + led@2 { + label = "blue"; + reg = <0x2>; + }; + }; + rtc@280 { compatible = "sprd,sc27xx-rtc", "sprd,sc2731-rtc"; reg = <0x280>; From f94cd003c2c0d9fba5f9a86d2cac06edbd0dbf4d Mon Sep 17 00:00:00 2001 From: Baolin Wang Date: Mon, 23 Jul 2018 14:10:17 +0800 Subject: [PATCH 2/5] arm64: dts: sprd: Add SC27XX vibrator device This patch adds the vibrator device node for Spreadtrum SC27XX PMICs. Signed-off-by: Baolin Wang Signed-off-by: Olof Johansson --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index 7d53ca6b4ecc..650bd6829d45 100644 --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi @@ -57,6 +57,11 @@ #interrupt-cells = <2>; }; + vibrator@ec8 { + compatible = "sprd,sc27xx-vibrator", "sprd,sc2731-vibrator"; + reg = <0xec8>; + }; + regulators { compatible = "sprd,sc27xx-regulator"; From 17a376c0b53a18975c71ebfc7cee71c3760de913 Mon Sep 17 00:00:00 2001 From: Baolin Wang Date: Mon, 23 Jul 2018 14:10:18 +0800 Subject: [PATCH 3/5] arm64: dts: sprd: Add SC27XX eFuse device This patch adds the eFuse device node for Spreadtrum SC27XX PMICs. The SC27XX eFuse contains 32 blocks and each block's data width is 16 bits. Signed-off-by: Baolin Wang Signed-off-by: Olof Johansson --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index 650bd6829d45..fc68076b8746 100644 --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi @@ -57,6 +57,14 @@ #interrupt-cells = <2>; }; + efuse@380 { + compatible = "sprd,sc27xx-efuse", "sprd,sc2731-efuse"; + reg = <0x380>; + #address-cells = <1>; + #size-cells = <1>; + hwlocks = <&hwlock 12>; + }; + vibrator@ec8 { compatible = "sprd,sc27xx-vibrator", "sprd,sc2731-vibrator"; reg = <0xec8>; From fc8e565f201853c22dfc75c873db9108488111bc Mon Sep 17 00:00:00 2001 From: Baolin Wang Date: Mon, 23 Jul 2018 14:10:19 +0800 Subject: [PATCH 4/5] arm64: dts: sprd: Add SC27XX ADC device Add the Spreadtrum SC27XX PMICs ADC device node which contains 32 channels. Signed-off-by: Baolin Wang Signed-off-by: Olof Johansson --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index fc68076b8746..82bd642d770b 100644 --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi @@ -65,6 +65,15 @@ hwlocks = <&hwlock 12>; }; + pmic_adc: adc@480 { + compatible = "sprd,sc27xx-adc", "sprd,sc2731-adc"; + reg = <0x480>; + interrupt-parent = <&sc2731_pmic>; + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; + #io-channel-cells = <1>; + hwlocks = <&hwlock 4>; + }; + vibrator@ec8 { compatible = "sprd,sc27xx-vibrator", "sprd,sc2731-vibrator"; reg = <0xec8>; From b2d94b3ff0638441460ce1fb23258cbd3374fd8e Mon Sep 17 00:00:00 2001 From: Baolin Wang Date: Mon, 23 Jul 2018 14:10:20 +0800 Subject: [PATCH 5/5] arm64: dts: sprd: Add one suspend timer On Spreadtrum platform, the current clocksource for timekeeping will be stopped in suspend state, thus add one always-on timer to calculate the suspend time. Signed-off-by: Baolin Wang Signed-off-by: Olof Johansson --- arch/arm64/boot/dts/sprd/whale2.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/whale2.dtsi b/arch/arm64/boot/dts/sprd/whale2.dtsi index e9db9108f3c0..eb6be5675f79 100644 --- a/arch/arm64/boot/dts/sprd/whale2.dtsi +++ b/arch/arm64/boot/dts/sprd/whale2.dtsi @@ -146,6 +146,12 @@ clocks = <&ext_32k>; }; + timer@40050020 { + compatible = "sprd,sc9860-suspend-timer"; + reg = <0 0x40050020 0 0x20>; + clocks = <&ext_32k>; + }; + hwlock: hwspinlock@40500000 { compatible = "sprd,hwspinlock-r3p0"; reg = <0 0x40500000 0 0x1000>;