Message ID | 20180906135047.30788-1-heiko@sntech.de |
---|---|
State | Superseded, archived |
Headers | show |
Series | [v4,1/2] dt-bindings: add binding for Rockchip hdmi phy using an Innosilicon IP | expand |
Hi Heiko, On Thursday 06 September 2018 07:20 PM, Heiko Stuebner wrote: > From: Zheng Yang <zhengyang@rock-chips.com> > > Add a driver for the Innosilicon hdmi phy used on rk3228/rk3229 > and rk3328 socs from Rockchip. > > Signed-off-by: Zheng Yang <zhengyang@rock-chips.com> > Signed-off-by: Heiko Stuebner <heiko@sntech.de> > Tested-by: Robin Murphy <robin.murphy@arm.com> I got a bunch of checkpatch "check" warnings "Alignment should match open parenthesis". Can you fix resend after fixing those? Thanks Kishon
On 2018-09-06 2:50 PM, Heiko Stuebner wrote: > From: Zheng Yang <zhengyang@rock-chips.com> > > Add a driver for the Innosilicon hdmi phy used on rk3228/rk3229 > and rk3328 socs from Rockchip. > > Signed-off-by: Zheng Yang <zhengyang@rock-chips.com> > Signed-off-by: Heiko Stuebner <heiko@sntech.de> > Tested-by: Robin Murphy <robin.murphy@arm.com> That reminds me, I really must dig out that box again and finish figuring out the GPIOs and regulators... :) [...] > +static int inno_hdmi_phy_probe(struct platform_device *pdev) > +{ > + struct inno_hdmi_phy *inno; > + const struct of_device_id *match; > + struct phy_provider *phy_provider; > + struct resource *res; > + void __iomem *regs; > + int ret; > + > + inno = devm_kzalloc(&pdev->dev, sizeof(*inno), GFP_KERNEL); > + if (!inno) > + return -ENOMEM; > + > + inno->dev = &pdev->dev; > + > + match = of_match_device(inno->dev->driver->of_match_table, inno->dev); > + inno->plat_data = (struct inno_hdmi_phy_drv_data *)match->data; Nit: if there's cause to do another respin anyway, you could simplify this part with of_device_get_match_data(). Robin.
Am Freitag, 7. September 2018, 10:58:04 CEST schrieb Robin Murphy: > On 2018-09-06 2:50 PM, Heiko Stuebner wrote: > > From: Zheng Yang <zhengyang@rock-chips.com> > > > > Add a driver for the Innosilicon hdmi phy used on rk3228/rk3229 > > and rk3328 socs from Rockchip. > > > > Signed-off-by: Zheng Yang <zhengyang@rock-chips.com> > > Signed-off-by: Heiko Stuebner <heiko@sntech.de> > > Tested-by: Robin Murphy <robin.murphy@arm.com> > > That reminds me, I really must dig out that box again and finish > figuring out the GPIOs and regulators... :) > > [...] > > +static int inno_hdmi_phy_probe(struct platform_device *pdev) > > +{ > > + struct inno_hdmi_phy *inno; > > + const struct of_device_id *match; > > + struct phy_provider *phy_provider; > > + struct resource *res; > > + void __iomem *regs; > > + int ret; > > + > > + inno = devm_kzalloc(&pdev->dev, sizeof(*inno), GFP_KERNEL); > > + if (!inno) > > + return -ENOMEM; > > + > > + inno->dev = &pdev->dev; > > + > > + match = of_match_device(inno->dev->driver->of_match_table, inno->dev); > > + inno->plat_data = (struct inno_hdmi_phy_drv_data *)match->data; > > Nit: if there's cause to do another respin anyway, you could simplify > this part with of_device_get_match_data(). done in v6 ... I found your mail directly after sending v5 ;-) .
Am Freitag, 7. September 2018, 10:58:04 CEST schrieb Robin Murphy: > On 2018-09-06 2:50 PM, Heiko Stuebner wrote: > > From: Zheng Yang <zhengyang@rock-chips.com> > > > > Add a driver for the Innosilicon hdmi phy used on rk3228/rk3229 > > and rk3328 socs from Rockchip. > > > > Signed-off-by: Zheng Yang <zhengyang@rock-chips.com> > > Signed-off-by: Heiko Stuebner <heiko@sntech.de> > > Tested-by: Robin Murphy <robin.murphy@arm.com> > > That reminds me, I really must dig out that box again and finish > figuring out the GPIOs and regulators... :) > > [...] > > +static int inno_hdmi_phy_probe(struct platform_device *pdev) > > +{ > > + struct inno_hdmi_phy *inno; > > + const struct of_device_id *match; > > + struct phy_provider *phy_provider; > > + struct resource *res; > > + void __iomem *regs; > > + int ret; > > + > > + inno = devm_kzalloc(&pdev->dev, sizeof(*inno), GFP_KERNEL); > > + if (!inno) > > + return -ENOMEM; > > + > > + inno->dev = &pdev->dev; > > + > > + match = of_match_device(inno->dev->driver->of_match_table, inno->dev); > > + inno->plat_data = (struct inno_hdmi_phy_drv_data *)match->data; > > Nit: if there's cause to do another respin anyway, you could simplify > this part with of_device_get_match_data(). done in v6 ... I found your mail directly after sending v5 ;-) .
diff --git a/Documentation/devicetree/bindings/phy/phy-rockchip-inno-hdmi.txt b/Documentation/devicetree/bindings/phy/phy-rockchip-inno-hdmi.txt new file mode 100644 index 000000000000..710cccd5ee56 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-inno-hdmi.txt @@ -0,0 +1,43 @@ +ROCKCHIP HDMI PHY WITH INNO IP BLOCK + +Required properties: + - compatible : should be one of the listed compatibles: + * "rockchip,rk3228-hdmi-phy", + * "rockchip,rk3328-hdmi-phy"; + - reg : Address and length of the hdmi phy control register set + - clocks : phandle + clock specifier for the phy clocks + - clock-names : string, clock name, must contain "sysclk" for system + control and register configuration, "refoclk" for crystal- + oscillator reference PLL clock input and "refpclk" for pclk- + based refeference PLL clock input. + - #clock-cells: should be 0. + - clock-output-names : shall be the name for the output clock. + - interrupts : phandle + interrupt specified for the hdmiphy interrupt + - #phy-cells : must be 0. See ./phy-bindings.txt for details. + +Optional properties for rk3328-hdmi-phy: + - nvmem-cells = phandle + nvmem specifier for the cpu-version efuse + - nvmem-cell-names : "cpu-version" to read the chip version, required + for adjustment to some frequency settings + +Example: + hdmi_phy: hdmi-phy@12030000 { + compatible = "rockchip,rk3228-hdmi-phy"; + reg = <0x12030000 0x10000>; + #phy-cells = <0>; + clocks = <&cru PCLK_HDMI_PHY>, <&xin24m>, <&cru DCLK_HDMIPHY>; + clock-names = "sysclk", "refoclk", "refpclk"; + #clock-cells = <0>; + clock-output-names = "hdmi_phy"; + status = "disabled"; + }; + +Then the PHY can be used in other nodes such as: + + hdmi: hdmi@200a0000 { + compatible = "rockchip,rk3228-dw-hdmi"; + ... + phys = <&hdmi_phy>; + phy-names = "hdmi"; + ... + };