Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'actions-drivers+s900-sps-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/drivers

Actions Semi SoC drivers for v4.20 #2

The SPS power domain driver is extended for S900 SoC.
This required merging a topic branch for the new bindings header.

* tag 'actions-drivers+s900-sps-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions:
soc: actions: sps: Add S900 power domains
dt-bindings: power: Add Actions Semi S900 SPS
soc: actions: Update SPS help text for S700
soc: actions: Convert to SPDX license identifiers

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+88 -11
+2
Documentation/devicetree/bindings/power/actions,owl-sps.txt
··· 3 3 Required properties: 4 4 - compatible : "actions,s500-sps" for S500 5 5 "actions,s700-sps" for S700 6 + "actions,s900-sps" for S900 6 7 - reg : Offset and length of the register set for the device. 7 8 - #power-domain-cells : Must be 1. 8 9 See macros in: 9 10 include/dt-bindings/power/owl-s500-powergate.h for S500 10 11 include/dt-bindings/power/owl-s700-powergate.h for S700 12 + include/dt-bindings/power/owl-s900-powergate.h for S900 11 13 12 14 13 15 Example:
+1 -1
drivers/soc/actions/Kconfig
··· 10 10 select PM_GENERIC_DOMAINS 11 11 help 12 12 Say 'y' here to enable support for Smart Power System (SPS) 13 - power-gating on Actions Semiconductor S500 SoC. 13 + power-gating on Actions Semiconductor S500, S700 and S900 SoCs. 14 14 If unsure, say 'n'. 15 15 16 16 endif
+2
drivers/soc/actions/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0+ 2 + 1 3 obj-$(CONFIG_OWL_PM_DOMAINS_HELPER) += owl-sps-helper.o 2 4 obj-$(CONFIG_OWL_PM_DOMAINS) += owl-sps.o
+1 -5
drivers/soc/actions/owl-sps-helper.c
··· 1 + // SPDX-License-Identifier: GPL-2.0+ 1 2 /* 2 3 * Actions Semi Owl Smart Power System (SPS) shared helpers 3 4 * ··· 6 5 * Author: Actions Semi, Inc. 7 6 * 8 7 * Copyright (c) 2017 Andreas Färber 9 - * 10 - * This program is free software; you can redistribute it and/or modify it 11 - * under the terms of the GNU General Public License as published by the 12 - * Free Software Foundation; either version 2 of the License, or (at your 13 - * option) any later version. 14 8 */ 15 9 16 10 #include <linux/delay.h>
+59 -5
drivers/soc/actions/owl-sps.c
··· 1 + // SPDX-License-Identifier: GPL-2.0+ 1 2 /* 2 3 * Actions Semi Owl Smart Power System (SPS) 3 4 * ··· 6 5 * Author: Actions Semi, Inc. 7 6 * 8 7 * Copyright (c) 2017 Andreas Färber 9 - * 10 - * This program is free software; you can redistribute it and/or modify it 11 - * under the terms of the GNU General Public License as published by the 12 - * Free Software Foundation; either version 2 of the License, or (at your 13 - * option) any later version. 14 8 */ 15 9 16 10 #include <linux/of_address.h> ··· 14 18 #include <linux/soc/actions/owl-sps.h> 15 19 #include <dt-bindings/power/owl-s500-powergate.h> 16 20 #include <dt-bindings/power/owl-s700-powergate.h> 21 + #include <dt-bindings/power/owl-s900-powergate.h> 17 22 18 23 struct owl_sps_domain_info { 19 24 const char *name; ··· 241 244 .domains = s700_sps_domains, 242 245 }; 243 246 247 + static const struct owl_sps_domain_info s900_sps_domains[] = { 248 + [S900_PD_GPU_B] = { 249 + .name = "GPU_B", 250 + .pwr_bit = 3, 251 + }, 252 + [S900_PD_VCE] = { 253 + .name = "VCE", 254 + .pwr_bit = 4, 255 + }, 256 + [S900_PD_SENSOR] = { 257 + .name = "SENSOR", 258 + .pwr_bit = 5, 259 + }, 260 + [S900_PD_VDE] = { 261 + .name = "VDE", 262 + .pwr_bit = 6, 263 + }, 264 + [S900_PD_HDE] = { 265 + .name = "HDE", 266 + .pwr_bit = 7, 267 + }, 268 + [S900_PD_USB3] = { 269 + .name = "USB3", 270 + .pwr_bit = 8, 271 + }, 272 + [S900_PD_DDR0] = { 273 + .name = "DDR0", 274 + .pwr_bit = 9, 275 + }, 276 + [S900_PD_DDR1] = { 277 + .name = "DDR1", 278 + .pwr_bit = 10, 279 + }, 280 + [S900_PD_DE] = { 281 + .name = "DE", 282 + .pwr_bit = 13, 283 + }, 284 + [S900_PD_NAND] = { 285 + .name = "NAND", 286 + .pwr_bit = 14, 287 + }, 288 + [S900_PD_USB2_H0] = { 289 + .name = "USB2_H0", 290 + .pwr_bit = 15, 291 + }, 292 + [S900_PD_USB2_H1] = { 293 + .name = "USB2_H1", 294 + .pwr_bit = 16, 295 + }, 296 + }; 297 + 298 + static const struct owl_sps_info s900_sps_info = { 299 + .num_domains = ARRAY_SIZE(s900_sps_domains), 300 + .domains = s900_sps_domains, 301 + }; 302 + 244 303 static const struct of_device_id owl_sps_of_matches[] = { 245 304 { .compatible = "actions,s500-sps", .data = &s500_sps_info }, 246 305 { .compatible = "actions,s700-sps", .data = &s700_sps_info }, 306 + { .compatible = "actions,s900-sps", .data = &s900_sps_info }, 247 307 { } 248 308 }; 249 309
+23
include/dt-bindings/power/owl-s900-powergate.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) */ 2 + /* 3 + * Actions Semi S900 SPS 4 + * 5 + * Copyright (c) 2018 Linaro Ltd. 6 + */ 7 + #ifndef DT_BINDINGS_POWER_OWL_S900_POWERGATE_H 8 + #define DT_BINDINGS_POWER_OWL_S900_POWERGATE_H 9 + 10 + #define S900_PD_GPU_B 0 11 + #define S900_PD_VCE 1 12 + #define S900_PD_SENSOR 2 13 + #define S900_PD_VDE 3 14 + #define S900_PD_HDE 4 15 + #define S900_PD_USB3 5 16 + #define S900_PD_DDR0 6 17 + #define S900_PD_DDR1 7 18 + #define S900_PD_DE 8 19 + #define S900_PD_NAND 9 20 + #define S900_PD_USB2_H0 10 21 + #define S900_PD_USB2_H1 11 22 + 23 + #endif