Skip to content

Commit e44fdd1

Browse files
tq-steinabebarino
authored andcommitted
clk: rs9: Add support for 9FGV0441
This model is similar to 9FGV0241, but the DIFx bits start at bit 0. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Marek Vasut <marex@denx.de> Link: https://lore.kernel.org/r/20230310075535.3476580-4-alexander.stein@ew.tq-group.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 603df19 commit e44fdd1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

drivers/clk/clk-renesas-pcie.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* - 9FGV/9DBV/9DMV/9FGL/9DML/9QXL/9SQ
77
* Currently supported:
88
* - 9FGV0241
9+
* - 9FGV0441
910
*
1011
* Copyright (C) 2022 Marek Vasut <marex@denx.de>
1112
*/
@@ -51,6 +52,7 @@
5152
/* Supported Renesas 9-series models. */
5253
enum rs9_model {
5354
RENESAS_9FGV0241,
55+
RENESAS_9FGV0441,
5456
};
5557

5658
/* Structure to describe features of a particular 9-series model */
@@ -64,7 +66,7 @@ struct rs9_driver_data {
6466
struct i2c_client *client;
6567
struct regmap *regmap;
6668
const struct rs9_chip_info *chip_info;
67-
struct clk_hw *clk_dif[2];
69+
struct clk_hw *clk_dif[4];
6870
u8 pll_amplitude;
6971
u8 pll_ssc;
7072
u8 clk_dif_sr;
@@ -161,6 +163,8 @@ static u8 rs9_calc_dif(const struct rs9_driver_data *rs9, int idx)
161163

162164
if (model == RENESAS_9FGV0241)
163165
return BIT(idx) + 1;
166+
else if (model == RENESAS_9FGV0441)
167+
return BIT(idx);
164168

165169
return 0;
166170
}
@@ -380,14 +384,22 @@ static const struct rs9_chip_info renesas_9fgv0241_info = {
380384
.did = RS9_REG_DID_TYPE_FGV | 0x02,
381385
};
382386

387+
static const struct rs9_chip_info renesas_9fgv0441_info = {
388+
.model = RENESAS_9FGV0441,
389+
.num_clks = 4,
390+
.did = RS9_REG_DID_TYPE_FGV | 0x04,
391+
};
392+
383393
static const struct i2c_device_id rs9_id[] = {
384394
{ "9fgv0241", .driver_data = RENESAS_9FGV0241 },
395+
{ "9fgv0441", .driver_data = RENESAS_9FGV0441 },
385396
{ }
386397
};
387398
MODULE_DEVICE_TABLE(i2c, rs9_id);
388399

389400
static const struct of_device_id clk_rs9_of_match[] = {
390401
{ .compatible = "renesas,9fgv0241", .data = &renesas_9fgv0241_info },
402+
{ .compatible = "renesas,9fgv0441", .data = &renesas_9fgv0441_info },
391403
{ }
392404
};
393405
MODULE_DEVICE_TABLE(of, clk_rs9_of_match);

0 commit comments

Comments
 (0)