phy: rockchip: mipi-dcphy: limit the maximum addr according to DC-PHY register map

Fix the issue where the system will reboot when exporting the PHY
registers from user space through the following command:

cat /d/regmap/feda0000.phy-dcphy/registers

or

cat /d/regmap/fedb0000.phy-dcphy/registers

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I46f90a04d15a4e583238e966953bc70fb9c3c150
This commit is contained in:
Guochun Huang
2024-09-21 11:05:41 +08:00
committed by Tao Huang
parent 353a8c61a1
commit 8dd21a945d

View File

@@ -217,6 +217,8 @@
#define RX_S0D3_DESKEW_CON0 (0xF40)
#define RX_S0D3_DESKEW_CON2 (0xF48)
#define RX_S0D3_DESKEW_CON4 (0xF50)
#define RX_S0D3_ADI_STAT0 (0XFEC)
#define MIPI_DCPHY_MAX_REGISGER RX_S0D3_ADI_STAT0
struct samsung_mipi_dphy_timing {
unsigned int max_lane_mbps;
@@ -2363,7 +2365,7 @@ static const struct regmap_config samsung_mipi_dcphy_regmap_config = {
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
.max_register = 0x10000,
.max_register = MIPI_DCPHY_MAX_REGISGER,
};
static int samsung_mipi_dcphy_probe(struct platform_device *pdev)