Skip to content

Commit d4a3b44

Browse files
committed
Merge tag 'v5.19-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/drivers
Powerdomain fixes and improvements, some GRF compatible properties and a rk3566 GRF clocksource default setup. * tag 'v5.19-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: soc: rockchip: Fix compile-testing SoC drivers soc: rockchip: power-domain: Replace dsb() with smb() soc: rockchip: Clean up Kconfig whitespace soc: rockchip: set dwc3 clock for rk3566 dt-bindings: soc: rockchip: add rk3566-pipe-grf compatible soc: rockchip: pm_domains: Fix typo in comment dt-bindings: soc: rockchip: add naneng combo phy register compatible Link: https://lore.kernel.org/r/3998951.tdWV9SEqCh@phil Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 3f656f2 + add9f6f commit d4a3b44

File tree

5 files changed

+38
-18
lines changed

5 files changed

+38
-18
lines changed

Documentation/devicetree/bindings/soc/rockchip/grf.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ properties:
1515
- items:
1616
- enum:
1717
- rockchip,rk3288-sgrf
18+
- rockchip,rk3566-pipe-grf
19+
- rockchip,rk3568-pipe-grf
20+
- rockchip,rk3568-pipe-phy-grf
1821
- rockchip,rk3568-usb2phy-grf
1922
- rockchip,rv1108-usbgrf
2023
- const: syscon

drivers/soc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ obj-y += microchip/
2222
obj-y += amlogic/
2323
obj-y += qcom/
2424
obj-y += renesas/
25-
obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
25+
obj-y += rockchip/
2626
obj-$(CONFIG_SOC_SAMSUNG) += samsung/
2727
obj-$(CONFIG_SOC_SIFIVE) += sifive/
2828
obj-y += sunxi/

drivers/soc/rockchip/Kconfig

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ config ROCKCHIP_IODOMAIN
2323
voltage supplied by the regulators.
2424

2525
config ROCKCHIP_PM_DOMAINS
26-
bool "Rockchip generic power domain"
27-
depends on PM
28-
select PM_GENERIC_DOMAINS
29-
help
30-
Say y here to enable power domain support.
31-
In order to meet high performance and low power requirements, a power
32-
management unit is designed or saving power when RK3288 in low power
33-
mode. The RK3288 PMU is dedicated for managing the power of the whole chip.
26+
bool "Rockchip generic power domain"
27+
depends on PM
28+
select PM_GENERIC_DOMAINS
29+
help
30+
Say y here to enable power domain support.
31+
In order to meet high performance and low power requirements, a power
32+
management unit is designed or saving power when RK3288 in low power
33+
mode. The RK3288 PMU is dedicated for managing the power of the whole chip.
3434

35-
If unsure, say N.
35+
If unsure, say N.
3636

3737
config ROCKCHIP_DTPM
3838
tristate "Rockchip DTPM hierarchy"
3939
depends on DTPM && m
4040
help
41-
Describe the hierarchy for the Dynamic Thermal Power
42-
Management tree on this platform. That will create all the
43-
power capping capable devices.
41+
Describe the hierarchy for the Dynamic Thermal Power Management tree
42+
on this platform. That will create all the power capping capable
43+
devices.
4444

4545
endif

drivers/soc/rockchip/grf.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,20 @@ static const struct rockchip_grf_info rk3399_grf __initconst = {
108108
.num_values = ARRAY_SIZE(rk3399_defaults),
109109
};
110110

111+
#define RK3566_GRF_USB3OTG0_CON1 0x0104
112+
113+
static const struct rockchip_grf_value rk3566_defaults[] __initconst = {
114+
{ "usb3otg port switch", RK3566_GRF_USB3OTG0_CON1, HIWORD_UPDATE(0, 1, 12) },
115+
{ "usb3otg clock switch", RK3566_GRF_USB3OTG0_CON1, HIWORD_UPDATE(1, 1, 7) },
116+
{ "usb3otg disable usb3", RK3566_GRF_USB3OTG0_CON1, HIWORD_UPDATE(1, 1, 0) },
117+
};
118+
119+
static const struct rockchip_grf_info rk3566_pipegrf __initconst = {
120+
.values = rk3566_defaults,
121+
.num_values = ARRAY_SIZE(rk3566_defaults),
122+
};
123+
124+
111125
static const struct of_device_id rockchip_grf_dt_match[] __initconst = {
112126
{
113127
.compatible = "rockchip,rk3036-grf",
@@ -130,6 +144,9 @@ static const struct of_device_id rockchip_grf_dt_match[] __initconst = {
130144
}, {
131145
.compatible = "rockchip,rk3399-grf",
132146
.data = (void *)&rk3399_grf,
147+
}, {
148+
.compatible = "rockchip,rk3566-pipe-grf",
149+
.data = (void *)&rk3566_pipegrf,
133150
},
134151
{ /* sentinel */ },
135152
};

drivers/soc/rockchip/pm_domains.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ static int rockchip_pmu_set_idle_request(struct rockchip_pm_domain *pd,
178178
regmap_update_bits(pmu->regmap, pmu->info->req_offset,
179179
pd_info->req_mask, idle ? -1U : 0);
180180

181-
dsb(sy);
181+
wmb();
182182

183183
/* Wait util idle_ack = 1 */
184184
target_ack = idle ? pd_info->ack_mask : 0;
@@ -285,7 +285,7 @@ static void rockchip_do_pmu_set_power_domain(struct rockchip_pm_domain *pd,
285285
regmap_update_bits(pmu->regmap, pmu->info->pwr_offset,
286286
pd->info->pwr_mask, on ? 0 : -1U);
287287

288-
dsb(sy);
288+
wmb();
289289

290290
if (readx_poll_timeout_atomic(rockchip_pmu_domain_is_on, pd, is_on,
291291
is_on == on, 0, 10000)) {
@@ -1068,9 +1068,9 @@ static struct platform_driver rockchip_pm_domain_driver = {
10681068
.name = "rockchip-pm-domain",
10691069
.of_match_table = rockchip_pm_domain_dt_match,
10701070
/*
1071-
* We can't forcibly eject devices form power domain,
1072-
* so we can't really remove power domains once they
1073-
* were added.
1071+
* We can't forcibly eject devices from the power
1072+
* domain, so we can't really remove power domains
1073+
* once they were added.
10741074
*/
10751075
.suppress_bind_attrs = true,
10761076
},

0 commit comments

Comments
 (0)