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

Configure Feed

Select the types of activity you want to include in your feed.

phy: uniphier-pcie: Add compatible string and SoC-dependent data for NX1 SoC

Add basic support for UniPhier NX1 SoC. This includes a compatible string,
SoC-dependent data, and a function that set to 2-lane mode.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/1635503947-18250-5-git-send-email-hayashi.kunihiko@socionext.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Kunihiko Hayashi and committed by
Vinod Koul
1c1597c8 21db1010

+19
+19
drivers/phy/socionext/phy-uniphier-pcie.c
··· 39 39 #define SG_USBPCIESEL 0x590 40 40 #define SG_USBPCIESEL_PCIE BIT(0) 41 41 42 + /* SC */ 43 + #define SC_US3SRCSEL 0x2244 44 + #define SC_US3SRCSEL_2LANE GENMASK(9, 8) 45 + 42 46 #define PCL_PHY_R00 0 43 47 #define RX_EQ_ADJ_EN BIT(3) /* enable for EQ adjustment */ 44 48 #define PCL_PHY_R06 6 ··· 265 261 SG_USBPCIESEL_PCIE, SG_USBPCIESEL_PCIE); 266 262 } 267 263 264 + static void uniphier_pciephy_nx1_setmode(struct regmap *regmap) 265 + { 266 + regmap_update_bits(regmap, SC_US3SRCSEL, 267 + SC_US3SRCSEL_2LANE, SC_US3SRCSEL_2LANE); 268 + } 269 + 268 270 static const struct uniphier_pciephy_soc_data uniphier_pro5_data = { 269 271 .is_legacy = true, 270 272 }; ··· 282 272 283 273 static const struct uniphier_pciephy_soc_data uniphier_pxs3_data = { 284 274 .is_legacy = false, 275 + }; 276 + 277 + static const struct uniphier_pciephy_soc_data uniphier_nx1_data = { 278 + .is_legacy = false, 279 + .set_phymode = uniphier_pciephy_nx1_setmode, 285 280 }; 286 281 287 282 static const struct of_device_id uniphier_pciephy_match[] = { ··· 301 286 { 302 287 .compatible = "socionext,uniphier-pxs3-pcie-phy", 303 288 .data = &uniphier_pxs3_data, 289 + }, 290 + { 291 + .compatible = "socionext,uniphier-nx1-pcie-phy", 292 + .data = &uniphier_nx1_data, 304 293 }, 305 294 { /* sentinel */ }, 306 295 };