[linux-sunxi] Re: [PATCH] clk: sunxi-ng: Make sure divider tables have sentinel

2020-12-02 Thread Maxime Ripard
Hi, On Wed, Dec 02, 2020 at 09:38:17PM +0100, Jernej Skrabec wrote: > Two clock divider tables are missing sentinel at the end. Effect of that > is that clock framework reads past the last entry. Fix that with adding > sentinel at the end. > > Issue was discovered with KASan. > > Fixes:

[linux-sunxi] Re: [PATCH 7/8] arm64: dts: allwinner: Add Allwinner H616 .dtsi file

2020-12-02 Thread Samuel Holland
Andre, On 12/2/20 7:54 AM, Andre Przywara wrote: ... > + soc { > + compatible = "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0x0 0x0 0x0 0x4000>; > + > + syscon: syscon@300 { > +

[linux-sunxi] Re: [PATCH 7/8] arm64: dts: allwinner: Add Allwinner H616 .dtsi file

2020-12-02 Thread Samuel Holland
On 12/2/20 10:05 AM, Maxime Ripard wrote: >> +timer { >> +compatible = "arm,armv8-timer"; >> +arm,no-tick-in-suspend; > > This was tested with crust I assume? No, there is no AR100 and supposedly no SRAM A2, so there is no place for crust to run. I assume it was

[linux-sunxi] Re: [PATCH 4/8] clk: sunxi-ng: Add support for the Allwinner H616 R-CCU

2020-12-02 Thread Samuel Holland
On 12/2/20 12:20 PM, Jernej Škrabec wrote: >> +}; >> + >> +static struct clk_hw_onecell_data sun50i_h616_r_hw_clks = { >> +.hws= { >> +[CLK_R_AHB] = _ahb_clk.hw, >> +[CLK_R_APB1]= _apb1_clk.common.hw, >> +[CLK_R_APB2]=

[linux-sunxi] Re: [PATCH 7/8] arm64: dts: allwinner: Add Allwinner H616 .dtsi file

2020-12-02 Thread André Przywara
On 02/12/2020 16:33, Jernej Škrabec wrote: Hi, > Dne sreda, 02. december 2020 ob 14:54:08 CET je Andre Przywara napisal(a): >> This (relatively) new SoC is similar to the H6, but drops the (broken) >> PCIe support and the USB 3.0 controller. It also gets the management >> controller removed,

[linux-sunxi] Re: [PATCH 5/8] clk: sunxi-ng: Add support for the Allwinner H616 CCU

2020-12-02 Thread André Przywara
On 02/12/2020 21:03, Jernej Škrabec wrote: > Dne sreda, 02. december 2020 ob 14:54:06 CET je Andre Przywara napisal(a): >> While the clocks are fairly similar to the H6, many differ in tiny >> details, so a separate clock driver seems indicated. >> >> Derived from the H6 clock driver, and adjusted

[linux-sunxi] Re: [PATCH 5/8] clk: sunxi-ng: Add support for the Allwinner H616 CCU

2020-12-02 Thread Jernej Škrabec
Dne sreda, 02. december 2020 ob 14:54:06 CET je Andre Przywara napisal(a): > While the clocks are fairly similar to the H6, many differ in tiny > details, so a separate clock driver seems indicated. > > Derived from the H6 clock driver, and adjusted according to the manual. > > Signed-off-by:

[linux-sunxi] [PATCH] clk: sunxi-ng: Make sure divider tables have sentinel

2020-12-02 Thread Jernej Skrabec
Two clock divider tables are missing sentinel at the end. Effect of that is that clock framework reads past the last entry. Fix that with adding sentinel at the end. Issue was discovered with KASan. Fixes: 0577e4853bfb ("clk: sunxi-ng: Add H3 clocks") Fixes: c6a0637460c2 ("clk: sunxi-ng: Add A64

[linux-sunxi] Re: [PATCH 4/8] clk: sunxi-ng: Add support for the Allwinner H616 R-CCU

2020-12-02 Thread Jernej Škrabec
Dne sreda, 02. december 2020 ob 14:54:05 CET je Andre Przywara napisal(a): > The clocks itself are identical to the H6 R-CCU, it's just that the H616 > has not all of them implemented (or connected). > > Signed-off-by: Andre Przywara > --- > drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c | 47

[linux-sunxi] Re: [PATCH 2/8] pinctrl: sunxi: Add support for the Allwinner H616 pin controller

2020-12-02 Thread Jernej Škrabec
Dne sreda, 02. december 2020 ob 14:54:03 CET je Andre Przywara napisal(a): > Port A is used for an internal connection to some analogue circuitry > which looks like an AC200 IP (as in the H6), though this is not > mentioned in the manual. > > Signed-off-by: Andre Przywara > --- >

[linux-sunxi] Re: [PATCH 3/8] pinctrl: sunxi: Add support for the Allwinner H616-R pin controller

2020-12-02 Thread Jernej Škrabec
Dne sreda, 02. december 2020 ob 14:54:04 CET je Andre Przywara napisal(a): > There are only two pins left now, used to connect to the PMIC via I2C. > > Signed-off-by: Andre Przywara > --- > drivers/pinctrl/sunxi/Kconfig | 5 ++ > drivers/pinctrl/sunxi/Makefile|

[linux-sunxi] Re: [PATCH 8/8] arm64: dts: allwinner: Add OrangePi Zero 2 .dts

2020-12-02 Thread André Przywara
On 02/12/2020 15:57, Icenowy Zheng wrote: > 在 2020-12-02星期三的 13:54 +,Andre Przywara写道: >> The OrangePi Zero 2 is a development board with the new H616 SoC. >> >> It features the usual connectors used on those small boards, and >> comes >> with the AXP305, which seems to be compatible with the

[linux-sunxi] Re: [PATCH 7/8] arm64: dts: allwinner: Add Allwinner H616 .dtsi file

2020-12-02 Thread Jernej Škrabec
Dne sreda, 02. december 2020 ob 14:54:08 CET je Andre Przywara napisal(a): > This (relatively) new SoC is similar to the H6, but drops the (broken) > PCIe support and the USB 3.0 controller. It also gets the management > controller removed, which in turn removes *some*, but not all of the >

[linux-sunxi] Re: [PATCH 7/8] arm64: dts: allwinner: Add Allwinner H616 .dtsi file

2020-12-02 Thread André Przywara
On 02/12/2020 16:03, Icenowy Zheng wrote: > 在 2020-12-02星期三的 13:54 +,Andre Przywara写道: >> This (relatively) new SoC is similar to the H6, but drops the >> (broken) >> PCIe support and the USB 3.0 controller. It also gets the management >> controller removed, which in turn removes *some*, but

[linux-sunxi] Re: Re: [PATCH 8/8] arm64: dts: allwinner: Add OrangePi Zero 2 .dts

2020-12-02 Thread Jernej Škrabec
Dne sreda, 02. december 2020 ob 17:07:02 CET je Maxime Ripard napisal(a): > On Wed, Dec 02, 2020 at 01:54:09PM +, Andre Przywara wrote: > > The OrangePi Zero 2 is a development board with the new H616 SoC. > > > > It features the usual connectors used on those small boards, and comes > > with

[linux-sunxi] Re: [PATCH 7/8] arm64: dts: allwinner: Add Allwinner H616 .dtsi file

2020-12-02 Thread Icenowy Zheng
于 2020年12月3日 GMT+08:00 上午12:05:04, Maxime Ripard 写到: >On Wed, Dec 02, 2020 at 01:54:08PM +, Andre Przywara wrote: >> This (relatively) new SoC is similar to the H6, but drops the >(broken) >> PCIe support and the USB 3.0 controller. It also gets the management >> controller removed, which

[linux-sunxi] Re: [PATCH 1/8] clk: sunxi-ng: h6: Fix clock divider range on some clocks

2020-12-02 Thread Jernej Škrabec
Dne sreda, 02. december 2020 ob 14:54:02 CET je Andre Przywara napisal(a): > While comparing clocks between the H6 and H616, some of the M factor > ranges were found to be wrong: the manual says they are only covering > two bits [1:0], but our code had "5" in the number-of-bits field. > > By

[linux-sunxi] Re: [PATCH v2 13/19] media: sunxi: Add support for the A31 MIPI CSI-2 controller

2020-12-02 Thread Paul Kocialkowski
Hi, On Wed 02 Dec 20, 16:48, Maxime Ripard wrote: > On Wed, Dec 02, 2020 at 03:44:47PM +0100, Paul Kocialkowski wrote: > > > > +static int __maybe_unused sun6i_mipi_csi2_suspend(struct device *dev) > > > > +{ > > > > + struct sun6i_mipi_csi2_dev *cdev = dev_get_drvdata(dev); > > > > + > > >

[linux-sunxi] Re: [PATCH v2 07/19] media: sun6i-csi: Add support for MIPI CSI-2 bridge input

2020-12-02 Thread Paul Kocialkowski
Hi, On Wed 02 Dec 20, 16:40, Maxime Ripard wrote: > On Wed, Dec 02, 2020 at 03:19:11PM +0100, Paul Kocialkowski wrote: > > Hi, > > > > On Tue 01 Dec 20, 13:12, Maxime Ripard wrote: > > > Hi, > > > > > > On Sat, Nov 28, 2020 at 03:28:27PM +0100, Paul Kocialkowski wrote: > > > > The A31 CSI

[linux-sunxi] Re: [PATCH 8/8] arm64: dts: allwinner: Add OrangePi Zero 2 .dts

2020-12-02 Thread Maxime Ripard
On Wed, Dec 02, 2020 at 01:54:09PM +, Andre Przywara wrote: > The OrangePi Zero 2 is a development board with the new H616 SoC. > > It features the usual connectors used on those small boards, and comes > with the AXP305, which seems to be compatible with the AXP805. > > For more details

[linux-sunxi] Re: [PATCH 7/8] arm64: dts: allwinner: Add Allwinner H616 .dtsi file

2020-12-02 Thread Maxime Ripard
On Wed, Dec 02, 2020 at 01:54:08PM +, Andre Przywara wrote: > This (relatively) new SoC is similar to the H6, but drops the (broken) > PCIe support and the USB 3.0 controller. It also gets the management > controller removed, which in turn removes *some*, but not all of the > devices formerly

[linux-sunxi] Re: [PATCH 7/8] arm64: dts: allwinner: Add Allwinner H616 .dtsi file

2020-12-02 Thread Icenowy Zheng
在 2020-12-02星期三的 13:54 +,Andre Przywara写道: > This (relatively) new SoC is similar to the H6, but drops the > (broken) > PCIe support and the USB 3.0 controller. It also gets the management > controller removed, which in turn removes *some*, but not all of the > devices formerly dedicated to

[linux-sunxi] Re: [PATCH 8/8] arm64: dts: allwinner: Add OrangePi Zero 2 .dts

2020-12-02 Thread Icenowy Zheng
在 2020-12-02星期三的 13:54 +,Andre Przywara写道: > The OrangePi Zero 2 is a development board with the new H616 SoC. > > It features the usual connectors used on those small boards, and > comes > with the AXP305, which seems to be compatible with the AXP805. > > For more details see:

[linux-sunxi] Re: [PATCH 5/8] clk: sunxi-ng: Add support for the Allwinner H616 CCU

2020-12-02 Thread Maxime Ripard
Hi On Wed, Dec 02, 2020 at 01:54:06PM +, Andre Przywara wrote: > While the clocks are fairly similar to the H6, many differ in tiny > details, so a separate clock driver seems indicated. > > Derived from the H6 clock driver, and adjusted according to the manual. > > Signed-off-by: Andre

[linux-sunxi] Re: [PATCH 3/8] pinctrl: sunxi: Add support for the Allwinner H616-R pin controller

2020-12-02 Thread Maxime Ripard
On Wed, Dec 02, 2020 at 01:54:04PM +, Andre Przywara wrote: > There are only two pins left now, used to connect to the PMIC via I2C. > > Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Maxime -- You received this message because you are subscribed to the Google Groups

[linux-sunxi] Re: [PATCH 2/8] pinctrl: sunxi: Add support for the Allwinner H616 pin controller

2020-12-02 Thread Maxime Ripard
Hi, On Wed, Dec 02, 2020 at 01:54:03PM +, Andre Przywara wrote: > Port A is used for an internal connection to some analogue circuitry > which looks like an AC200 IP (as in the H6), though this is not > mentioned in the manual. > > Signed-off-by: Andre Przywara There's a bunch of issues

[linux-sunxi] Re: [PATCH v2 13/19] media: sunxi: Add support for the A31 MIPI CSI-2 controller

2020-12-02 Thread Maxime Ripard
On Wed, Dec 02, 2020 at 03:44:47PM +0100, Paul Kocialkowski wrote: > > > +static int __maybe_unused sun6i_mipi_csi2_suspend(struct device *dev) > > > +{ > > > + struct sun6i_mipi_csi2_dev *cdev = dev_get_drvdata(dev); > > > + > > > + clk_disable_unprepare(cdev->clk_mod); > > > +

[linux-sunxi] Re: [PATCH v2 09/19] ARM: dts: sunxi: h3/h5: Add CSI controller port for parallel input

2020-12-02 Thread Maxime Ripard
On Wed, Dec 02, 2020 at 04:02:09PM +0100, Paul Kocialkowski wrote: > Hi, > > On Tue 01 Dec 20, 13:14, Maxime Ripard wrote: > > On Sat, Nov 28, 2020 at 03:28:29PM +0100, Paul Kocialkowski wrote: > > > Since the CSI controller binding is getting a bit more complex due > > > to the addition of MIPI

[linux-sunxi] Re: [PATCH v2 07/19] media: sun6i-csi: Add support for MIPI CSI-2 bridge input

2020-12-02 Thread Maxime Ripard
On Wed, Dec 02, 2020 at 03:19:11PM +0100, Paul Kocialkowski wrote: > Hi, > > On Tue 01 Dec 20, 13:12, Maxime Ripard wrote: > > Hi, > > > > On Sat, Nov 28, 2020 at 03:28:27PM +0100, Paul Kocialkowski wrote: > > > The A31 CSI controller supports a MIPI CSI-2 bridge input, which has > > > its own

[linux-sunxi] Re: [PATCH v2 09/19] ARM: dts: sunxi: h3/h5: Add CSI controller port for parallel input

2020-12-02 Thread Paul Kocialkowski
Hi, On Tue 01 Dec 20, 13:14, Maxime Ripard wrote: > On Sat, Nov 28, 2020 at 03:28:29PM +0100, Paul Kocialkowski wrote: > > Since the CSI controller binding is getting a bit more complex due > > to the addition of MIPI CSI-2 bridge support, make the ports node > > explicit with the parallel port.

[linux-sunxi] Re: [PATCH v2 13/19] media: sunxi: Add support for the A31 MIPI CSI-2 controller

2020-12-02 Thread Paul Kocialkowski
Hi, On Tue 01 Dec 20, 13:20, Maxime Ripard wrote: > Hi, > > On Sat, Nov 28, 2020 at 03:28:33PM +0100, Paul Kocialkowski wrote: > > The A31 MIPI CSI-2 controller is a dedicated MIPI CSI-2 bridge > > found on Allwinner SoCs such as the A31 and V3/V3s. > > > > It is a standalone block, connected

[linux-sunxi] Re: [PATCH 4/8] clk: sunxi-ng: Add support for the Allwinner H616 R-CCU

2020-12-02 Thread Icenowy Zheng
于 2020年12月2日 GMT+08:00 下午9:54:05, Andre Przywara 写到: >The clocks itself are identical to the H6 R-CCU, it's just that the >H616 >has not all of them implemented (or connected). For selective clocks, try to follow the practice of V3(s) driver? > >Signed-off-by: Andre Przywara >--- >

[linux-sunxi] Re: [PATCH v2 07/19] media: sun6i-csi: Add support for MIPI CSI-2 bridge input

2020-12-02 Thread Paul Kocialkowski
Hi, On Tue 01 Dec 20, 13:12, Maxime Ripard wrote: > Hi, > > On Sat, Nov 28, 2020 at 03:28:27PM +0100, Paul Kocialkowski wrote: > > The A31 CSI controller supports a MIPI CSI-2 bridge input, which has > > its own dedicated port in the fwnode graph. > > > > Support for this input is added with

[linux-sunxi] Re: [PATCH v2 06/19] dt-bindings: media: sun6i-a31-csi: Add MIPI CSI-2 input port

2020-12-02 Thread Paul Kocialkowski
Hi, On Tue 01 Dec 20, 11:43, Maxime Ripard wrote: > On Sat, Nov 28, 2020 at 03:28:26PM +0100, Paul Kocialkowski wrote: > > The A31 CSI controller supports two distinct input interfaces: > > parallel and an external MIPI CSI-2 bridge. The parallel interface > > is often connected to a set of

[linux-sunxi] [PATCH 8/8] arm64: dts: allwinner: Add OrangePi Zero 2 .dts

2020-12-02 Thread Andre Przywara
The OrangePi Zero 2 is a development board with the new H616 SoC. It features the usual connectors used on those small boards, and comes with the AXP305, which seems to be compatible with the AXP805. For more details see: http://linux-sunxi.org/Xunlong_Orange_Pi_Zero2 Signed-off-by: Andre

[linux-sunxi] [PATCH 7/8] arm64: dts: allwinner: Add Allwinner H616 .dtsi file

2020-12-02 Thread Andre Przywara
This (relatively) new SoC is similar to the H6, but drops the (broken) PCIe support and the USB 3.0 controller. It also gets the management controller removed, which in turn removes *some*, but not all of the devices formerly dedicated to the ARISC (CPUS). There does not seem to be an external

[linux-sunxi] [PATCH 0/8] arm64: sunxi: Initial Allwinner H616 SoC support

2020-12-02 Thread Andre Przywara
Hi, this is the first attempt of supporting the Allwinner H616 SoC. This is a rather uninspired SoC (Quad-A53 with the usual peripherals), but allows for some cheap development boards and TV boxes, and supports up to 4GB of DRAM. There are surely many issues in this series, but I wanted to get

[linux-sunxi] [PATCH 6/8] mmc: sunxi: add support for A100 mmc controller

2020-12-02 Thread Andre Przywara
From: Yangtao Li This patch adds support for A100 MMC controller, which use word address for internal dma. Signed-off-by: Yangtao Li Signed-off-by: Andre Przywara --- drivers/mmc/host/sunxi-mmc.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git

[linux-sunxi] [PATCH 5/8] clk: sunxi-ng: Add support for the Allwinner H616 CCU

2020-12-02 Thread Andre Przywara
While the clocks are fairly similar to the H6, many differ in tiny details, so a separate clock driver seems indicated. Derived from the H6 clock driver, and adjusted according to the manual. Signed-off-by: Andre Przywara --- drivers/clk/sunxi-ng/Kconfig|7 +-

[linux-sunxi] [PATCH 3/8] pinctrl: sunxi: Add support for the Allwinner H616-R pin controller

2020-12-02 Thread Andre Przywara
There are only two pins left now, used to connect to the PMIC via I2C. Signed-off-by: Andre Przywara --- drivers/pinctrl/sunxi/Kconfig | 5 ++ drivers/pinctrl/sunxi/Makefile| 1 + drivers/pinctrl/sunxi/pinctrl-sun50i-h616-r.c | 58 +++ 3 files

[linux-sunxi] [PATCH 4/8] clk: sunxi-ng: Add support for the Allwinner H616 R-CCU

2020-12-02 Thread Andre Przywara
The clocks itself are identical to the H6 R-CCU, it's just that the H616 has not all of them implemented (or connected). Signed-off-by: Andre Przywara --- drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c | 47 +- drivers/clk/sunxi-ng/ccu-sun50i-h6-r.h | 3 +- 2 files changed, 48

[linux-sunxi] [PATCH 2/8] pinctrl: sunxi: Add support for the Allwinner H616 pin controller

2020-12-02 Thread Andre Przywara
Port A is used for an internal connection to some analogue circuitry which looks like an AC200 IP (as in the H6), though this is not mentioned in the manual. Signed-off-by: Andre Przywara --- drivers/pinctrl/sunxi/Kconfig | 5 + drivers/pinctrl/sunxi/Makefile | 1

[linux-sunxi] [PATCH 1/8] clk: sunxi-ng: h6: Fix clock divider range on some clocks

2020-12-02 Thread Andre Przywara
While comparing clocks between the H6 and H616, some of the M factor ranges were found to be wrong: the manual says they are only covering two bits [1:0], but our code had "5" in the number-of-bits field. By writing 0xff into that register in U-Boot and via FEL, it could be confirmed that bits