* Re: [PATCH 1/2] dt-bindings: spi: Add Baikal-T1 System Boot SPI Controller binding
From: Serge Semin @ 2020-05-18 21:55 UTC (permalink / raw)
To: Rob Herring
Cc: Serge Semin, Mark Brown, Ramil Zaripov, Alexey Malahov,
Thomas Bogendoerfer, Paul Burton, Ralf Baechle, John Garry,
Chuanhong Guo, Tomer Maimon, Lee Jones, Miquel Raynal,
Arnd Bergmann, linux-mips, linux-spi, devicetree, linux-kernel
In-Reply-To: <20200518152659.GA2525@bogus>
On Mon, May 18, 2020 at 09:26:59AM -0600, Rob Herring wrote:
> On Fri, May 08, 2020 at 12:36:20PM +0300, Serge Semin wrote:
> > Baikal-T1 Boot SPI is a part of the SoC System Controller and is
> > responsible for the system bootup from an external SPI flash. It's a DW
> > APB SSI-based SPI-controller with no interrupts, no DMA, with just one
> > native chip-select available and a single reference clock. Since Baikal-T1
> > SoC is normally booted up from an external SPI flash this SPI controller
> > in most of the cases is supposed to be connected to a single SPI-nor
> > flash. Additionally in order to provide a transparent from CPU point of
> > view initial code execution procedure the system designers created an IP
> > block which physically maps the SPI flash found at CS0 to a memory region.
BTW Rob, could you also provide your review for the next patch:
https://lore.kernel.org/linux-mips/20200515104758.6934-20-Sergey.Semin@baikalelectronics.ru/
?
We agreed with Mark to merge this driver into the generic DW APB SSI code so to
be available for another platforms. Since our DW APB SSI IP's got too many
peculiarities I'll have to provide a new compatible string. It would be great to
add it into the DW schema binding instead of currently available text-based
legacy binding file.
[nip]
^ permalink raw reply
* Re: [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add Shanghai Awinic Technology Co., Ltd.
From: Rob Herring @ 2020-05-18 22:14 UTC (permalink / raw)
To: nikitos.tr
Cc: dmurphy, robh+dt, linux-kernel, pavel, linux-leds, devicetree,
~postmarketos/upstreaming
In-Reply-To: <20200511111128.16210-1-nikitos.tr@gmail.com>
On Mon, 11 May 2020 16:11:26 +0500, wrote:
> From: Nikita Travkin <nikitos.tr@gmail.com>
>
> Add the "awinic" vendor prefix for Shanghai Awinic Technology Co., Ltd.
> Website: https://www.awinic.com/
>
> Signed-off-by: Nikita Travkin <nikitos.tr@gmail.com>
> ---
> Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* Re: [PATCH v3 1/4] ARM: dts: rockchip: remove identical #include from rk3288.dtsi
From: Heiko Stuebner @ 2020-05-18 22:28 UTC (permalink / raw)
To: Johan Jonker
Cc: Heiko Stuebner, devicetree, linux-rockchip, robh+dt,
linux-arm-kernel, linux-kernel
In-Reply-To: <20200403180159.13387-1-jbx6244@gmail.com>
On Fri, 3 Apr 2020 20:01:56 +0200, Johan Jonker wrote:
> There are 2 identical '#include' for 'rk3288-power.h',
> so remove one of them.
Applied, thanks!
[1/1] ARM: dts: rockchip: remove identical #include from rk3288.dtsi
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply
* Re: [PATCH 1/6] arm64: dts: rockchip: fix phy nodename for rk3328
From: Heiko Stuebner @ 2020-05-18 22:27 UTC (permalink / raw)
To: Johan Jonker
Cc: Heiko Stuebner, devicetree, linux-rockchip, robin.murphy,
linux-arm-kernel, robh+dt, linux-kernel, aballier
In-Reply-To: <20200321215423.12176-1-jbx6244@gmail.com>
On Sat, 21 Mar 2020 22:54:18 +0100, Johan Jonker wrote:
> A test with the command below gives for example this error:
>
> arch/arm64/boot/dts/rockchip/rk3328-evb.dt.yaml: phy@0:
> '#phy-cells' is a required property
>
> The phy nodename is used by a phy-handle.
> The parent node is compatible with "snps,dwmac-mdio",
> so change nodename to 'ethernet-phy', for which '#phy-cells'
> is not a required property
>
> [...]
Applied, thanks!
[1/6] arm64: dts: rockchip: fix phy nodename for rk3328
commit: 8370cc5533b3baa5e0f18075ae638b050458aabd
[2/6] arm64: dts: rockchip: fix rtl8211f nodename for rk3328 Beelink A1
commit: 63834d1edb96e2016191e53444934299bbc06bb1
[3/6] arm64: dts: rockchip: fix rtl8211e nodename for rk3399-nanopi4
commit: b450d1c566bd726f93bc72a3cf3155cecebc1b75
[4/6] arm64: dts: rockchip: fix &pinctrl phy sub nodename for rk3399-nanopi4
commit: 737157f9618b40c7147cf697aec431ce9dd178a0
[5/6] arm64: dts: rockchip: fix rtl8211e nodename for rk3399-orangepi
commit: b2bb769100d49c6acbfb2756cc4748aac09209c9
[6/6] arm64: dts: rockchip: fix &pinctrl phy sub nodename for rk3399-orangepi
commit: 302a729c84b59c835f7857ec378efecbda58b9b3
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply
* Re: [PATCH v2] arm64: dts: rockchip: fix phy nodename for rk3328
From: Heiko Stuebner @ 2020-05-18 22:28 UTC (permalink / raw)
To: Johan Jonker
Cc: Heiko Stuebner, devicetree, linux-rockchip, robh+dt,
linux-arm-kernel, linux-kernel
In-Reply-To: <20200505170227.6503-1-jbx6244@gmail.com>
On Tue, 5 May 2020 19:02:27 +0200, Johan Jonker wrote:
> A test with the command below gives for example this error:
>
> arch/arm64/boot/dts/rockchip/rk3328-evb.dt.yaml: phy@0:
> '#phy-cells' is a required property
>
> The phy nodename is normally used by a phy-handle.
> This node is however compatible with
> "ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22"
> which is just been added to 'ethernet-phy.yaml'.
> So change nodename to 'ethernet-phy' for which '#phy-cells'
> is not a required property
>
> [...]
Applied, thanks!
[1/1] arm64: dts: rockchip: fix phy nodename for rk3328
commit: 8370cc5533b3baa5e0f18075ae638b050458aabd
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply
* Re: [PATCH 1/3] arm64: dts: rockchip: replace RK_FUNC defines in rk3326-odroid-go2.dts
From: Heiko Stuebner @ 2020-05-18 22:27 UTC (permalink / raw)
To: Johan Jonker
Cc: Heiko Stuebner, devicetree, linux-rockchip, linux-arm-kernel,
robh+dt, linux-gpio, linux-kernel, linus.walleij
In-Reply-To: <20200512203524.7317-1-jbx6244@gmail.com>
On Tue, 12 May 2020 22:35:22 +0200, Johan Jonker wrote:
> The defines RK_FUNC_1 and RK_FUNC_2 are deprecated,
> so replace them with the preferred form.
> Restyle properties in the same line.
Applied, thanks!
[1/2] arm64: dts: rockchip: replace RK_FUNC defines in rk3326-odroid-go2
commit: 213f272b754f4e27aeab9d1265c775610e612bb7
[2/2] include: dt-bindings: rockchip: remove unused defines
commit: d09855bdd8c4d4eb6e58b8546318ebb5859a513c
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply
* Re: [PATCH v2 1/2] arm64: dts: rockchip: fix defines in pd_vio node for rk3399
From: Heiko Stuebner @ 2020-05-18 22:28 UTC (permalink / raw)
To: Johan Jonker
Cc: Heiko Stuebner, devicetree, linux-rockchip, robh+dt,
linux-arm-kernel, linux-kernel
In-Reply-To: <20200428203003.3318-1-jbx6244@gmail.com>
On Tue, 28 Apr 2020 22:30:02 +0200, Johan Jonker wrote:
> A test with the command below gives for example this error:
>
> arch/arm64/boot/dts/rockchip/rk3399-evb.dt.yaml: pd_vio@15:
> 'pd_tcpc0@RK3399_PD_TCPC0', 'pd_tcpc1@RK3399_PD_TCPC1'
> do not match any of the regexes:
> '.*-names$', '.*-supply$', '^#.*-cells$',
> '^#[a-zA-Z0-9,+\\-._]{0,63}$',
> '^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}$',
> '^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+(,[0-9a-fA-F]+)*$',
> '^__.*__$', 'pinctrl-[0-9]+'
>
> [...]
Applied, thanks!
[1/1] arm64: dts: rockchip: fix defines in pd_vio node for rk3399
commit: 84836ded76ec9a6f25d1d0acebaad44977e0ec6f
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply
* Re: [PATCH v1 1/2] ARM: dts: rockchip: rename and label gpio-led subnodes
From: Heiko Stuebner @ 2020-05-18 22:27 UTC (permalink / raw)
To: Johan Jonker
Cc: Heiko Stuebner, devicetree, linux-rockchip, robh+dt,
linux-arm-kernel, linux-kernel
In-Reply-To: <20200428144933.10953-1-jbx6244@gmail.com>
On Tue, 28 Apr 2020 16:49:32 +0200, Johan Jonker wrote:
> Current dts files with 'gpio-led' nodes were manually verified.
> In order to automate this process leds-gpio.txt
> has been converted to yaml. With this conversion a check
> for pattern properties was added. A test with the command
> below gives a screen full of warnings like:
>
> arch/arm/boot/dts/rk3188-radxarock.dt.yaml: gpio-leds:
> 'blue', 'green', 'sleep'
> do not match any of the regexes:
> '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+'
>
> [...]
Applied, thanks!
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply
* Re: [PATCH] arm64: dts: rockchip: remove disable-wp from rk3308-roc-cc emmc node
From: Heiko Stuebner @ 2020-05-18 22:27 UTC (permalink / raw)
To: Johan Jonker
Cc: Heiko Stuebner, devicetree, linux-rockchip, robh+dt,
linux-arm-kernel, linux-kernel, mark.rutland
In-Reply-To: <20191219121954.2450-1-jbx6244@gmail.com>
On Thu, 19 Dec 2019 13:19:54 +0100, Johan Jonker wrote:
> The mmc-controller.yaml didn't explicitly say disable-wp is
> for SD card slot only, but that is what it was designed for
> in the first place.
> Remove all disable-wp from emmc or sdio controllers.
Applied, thanks!
[1/1] arm64: dts: rockchip: remove disable-wp from rk3308-roc-cc emmc node
commit: 1fab4cf51e48e9525cf70a9604e90dd3dd666a2f
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply
* Re: [PATCH v3 3/4] arm64: dts: rockchip: remove include for irq.h
From: Heiko Stübner @ 2020-05-18 22:29 UTC (permalink / raw)
To: Johan Jonker
Cc: robh+dt, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel
In-Reply-To: <20200403180159.13387-3-jbx6244@gmail.com>
Hi Johan,
Am Freitag, 3. April 2020, 20:01:58 CEST schrieb Johan Jonker:
> The 'irq.h' file is already included through 'arm-gic.h',
> so remove them from all Rockchip dtsi files.
I disagree here ... we do use properties from both arm-gic.h and
the main irq.h an therefore should not rely on the arm-gic.h
"accidentially" including irq.h
Heiko
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> ---
> arch/arm64/boot/dts/rockchip/px30.dtsi | 1 -
> arch/arm64/boot/dts/rockchip/rk3308.dtsi | 1 -
> arch/arm64/boot/dts/rockchip/rk3328.dtsi | 1 -
> arch/arm64/boot/dts/rockchip/rk3368.dtsi | 1 -
> arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 -
> 5 files changed, 5 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi
> index 6f7171290..4820edc7f 100644
> --- a/arch/arm64/boot/dts/rockchip/px30.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/px30.dtsi
> @@ -6,7 +6,6 @@
> #include <dt-bindings/clock/px30-cru.h>
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> -#include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/pinctrl/rockchip.h>
> #include <dt-bindings/power/px30-power.h>
> #include <dt-bindings/soc/rockchip,boot-mode.h>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3308.dtsi b/arch/arm64/boot/dts/rockchip/rk3308.dtsi
> index ac43bc3f7..a9b98555d 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3308.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3308.dtsi
> @@ -7,7 +7,6 @@
> #include <dt-bindings/clock/rk3308-cru.h>
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> -#include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/pinctrl/rockchip.h>
> #include <dt-bindings/soc/rockchip,boot-mode.h>
> #include <dt-bindings/thermal/thermal.h>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> index 470783a48..175060695 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
> @@ -6,7 +6,6 @@
> #include <dt-bindings/clock/rk3328-cru.h>
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> -#include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/pinctrl/rockchip.h>
> #include <dt-bindings/power/rk3328-power.h>
> #include <dt-bindings/soc/rockchip,boot-mode.h>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
> index 1ebb0eef4..f22475016 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3368.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
> @@ -5,7 +5,6 @@
>
> #include <dt-bindings/clock/rk3368-cru.h>
> #include <dt-bindings/gpio/gpio.h>
> -#include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/pinctrl/rockchip.h>
> #include <dt-bindings/soc/rockchip,boot-mode.h>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 0d895cff5..123b7402a 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -6,7 +6,6 @@
> #include <dt-bindings/clock/rk3399-cru.h>
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> -#include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/pinctrl/rockchip.h>
> #include <dt-bindings/power/rk3399-power.h>
> #include <dt-bindings/thermal/thermal.h>
>
^ permalink raw reply
* Re: [PATCH v2 2/2] arm64: dts: rockchip: rk3399: fix pd_tcpc0 and pd_tcpc1 node position
From: Heiko Stübner @ 2020-05-18 22:29 UTC (permalink / raw)
To: Johan Jonker, kever.yang, Caesar Wang
Cc: robh+dt, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel
In-Reply-To: <20200428203003.3318-2-jbx6244@gmail.com>
Hi Kever, Caesar,
could you double check where the type-c power-domains are located
in the power-tree, as Caesar did add them under pd_vio back in 2016.
Thanks
Heiko
Am Dienstag, 28. April 2020, 22:30:03 CEST schrieb Johan Jonker:
> The pd_tcpc0 and pd_tcpc1 nodes are currently a sub node of pd_vio.
> In the rk3399 TRM figure of the 'Power Domain Partition' and in the
> table of 'Power Domain and Voltage Domain Summary' these power domains
> are positioned directly under VD_LOGIC, so fix that in 'rk3399.dtsi'.
>
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> ---
> arch/arm64/boot/dts/rockchip/rk3399.dtsi | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 37279db53..a4dc1bf2e 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -1056,6 +1056,16 @@
> clocks = <&cru HCLK_SDIO>;
> pm_qos = <&qos_sdioaudio>;
> };
> + pd_tcpc0@RK3399_PD_TCPD0 {
> + reg = <RK3399_PD_TCPD0>;
> + clocks = <&cru SCLK_UPHY0_TCPDCORE>,
> + <&cru SCLK_UPHY0_TCPDPHY_REF>;
> + };
> + pd_tcpc1@RK3399_PD_TCPD1 {
> + reg = <RK3399_PD_TCPD1>;
> + clocks = <&cru SCLK_UPHY1_TCPDCORE>,
> + <&cru SCLK_UPHY1_TCPDPHY_REF>;
> + };
> pd_usb3@RK3399_PD_USB3 {
> reg = <RK3399_PD_USB3>;
> clocks = <&cru ACLK_USB3>;
> @@ -1088,16 +1098,6 @@
> pm_qos = <&qos_isp1_m0>,
> <&qos_isp1_m1>;
> };
> - pd_tcpc0@RK3399_PD_TCPD0 {
> - reg = <RK3399_PD_TCPD0>;
> - clocks = <&cru SCLK_UPHY0_TCPDCORE>,
> - <&cru SCLK_UPHY0_TCPDPHY_REF>;
> - };
> - pd_tcpc1@RK3399_PD_TCPD1 {
> - reg = <RK3399_PD_TCPD1>;
> - clocks = <&cru SCLK_UPHY1_TCPDCORE>,
> - <&cru SCLK_UPHY1_TCPDPHY_REF>;
> - };
> pd_vo@RK3399_PD_VO {
> reg = <RK3399_PD_VO>;
> #address-cells = <1>;
>
^ permalink raw reply
* Re: [PATCH v2 2/3] dt-bindings: leds: Add binding for aw2013
From: Rob Herring @ 2020-05-18 22:36 UTC (permalink / raw)
To: nikitos.tr
Cc: dmurphy, linux-leds, devicetree, linux-kernel, robh+dt, pavel,
~postmarketos/upstreaming
In-Reply-To: <20200511111128.16210-2-nikitos.tr@gmail.com>
On Mon, 11 May 2020 16:11:27 +0500, wrote:
> From: Nikita Travkin <nikitos.tr@gmail.com>
>
> Add YAML devicetree binding for AWINIC AW2013 3-channel led driver
>
> Signed-off-by: Nikita Travkin <nikitos.tr@gmail.com>
> ---
> .../devicetree/bindings/leds/leds-aw2013.yaml | 91 +++++++++++++++++++
> 1 file changed, 91 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/leds/leds-aw2013.yaml
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* Re: [PATCH 1/2] arm64: dts: qcom: sc7180: Support ETMv4 power management
From: Bjorn Andersson @ 2020-05-18 22:35 UTC (permalink / raw)
To: Sai Prakash Ranjan
Cc: Mathieu Poirier, Suzuki K Poulose, Mike Leach, devicetree,
Rob Herring, Andy Gross, Stephen Boyd, linux-arm-kernel,
linux-kernel, linux-arm-msm, coresight
In-Reply-To: <badc88ecd5932033235ed9bcd173ea16@codeaurora.org>
On Mon 18 May 12:08 PDT 2020, Sai Prakash Ranjan wrote:
> Hi Bjorn,
>
> On 2020-05-19 00:21, Bjorn Andersson wrote:
> > On Fri 15 May 03:55 PDT 2020, Sai Prakash Ranjan wrote:
>
> [...]
>
> > >
> > >
> > > The previous version of this patch in QCOM tree seems to have added
> > > the
> > > property to replicator node instead of etm7 node, can you please drop
> > > that from the tree and apply this one?
> > >
> >
> > I'm not able to replace the old commit without rewriting the history of
> > the branch. So I've applied a patch ontop of the branch to fix this up
> > instead.
> >
> > Please review the branch and let me know if there's any issues.
> >
>
> Thanks for the patch, I checked the branch and its good.
> Sorry, I should have sent a patch on top of the old one
> instead of repost.
>
No worries, now you know for next time. Thanks confirming my fix.
Thanks,
Bjorn
^ permalink raw reply
* Re: [PATCH V2] dt-bindings: reset: Convert i.MX7 reset to json-schema
From: Rob Herring @ 2020-05-18 22:42 UTC (permalink / raw)
To: Anson Huang
Cc: Philipp Zabel, Shawn Guo, Sascha Hauer, Sascha Hauer,
Fabio Estevam, Andrey Smirnov, devicetree,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
linux-kernel@vger.kernel.org, NXP Linux Team
In-Reply-To: <1589198262-21372-1-git-send-email-Anson.Huang@nxp.com>
On Mon, May 11, 2020 at 6:07 AM Anson Huang <Anson.Huang@nxp.com> wrote:
>
> Convert the i.MX7 reset binding to DT schema format using json-schema.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
> Changes since V1:
> - Improve description;
> - Remove i.MX8MM and i.MX8MN compatible, they use i.MX8MQ's compatible;
> - Keep original author as maintainer;
> - Remove unnecessary "..." at the end of file.
> ---
> .../devicetree/bindings/reset/fsl,imx7-src.txt | 56 ---------------------
> .../devicetree/bindings/reset/fsl,imx7-src.yaml | 58 ++++++++++++++++++++++
> 2 files changed, 58 insertions(+), 56 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/reset/fsl,imx7-src.txt
> create mode 100644 Documentation/devicetree/bindings/reset/fsl,imx7-src.yaml
I'd apply but doesn't apply cleanly to my tree, so:
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* Re: [PATCH] ARM: dts: remove disable-wp from rk3229-xms6 emmc
From: Heiko Stübner @ 2020-05-18 22:42 UTC (permalink / raw)
To: Justin Swartz
Cc: Rob Herring, Mark Rutland, linux-arm-kernel, linux-rockchip,
devicetree, linux-kernel
In-Reply-To: <20200406135006.23759-2-justin.swartz@risingedge.co.za>
Am Montag, 6. April 2020, 15:50:05 CEST schrieb Justin Swartz:
> Remove the disable-wp attribute from &emmc as it is, according to
> Documentation/devicetree/bindings/mmc/mmc-controller.yaml:
>
> "Not used in combination with eMMC or SDIO."
>
> Suggested-by: Johan Jonker <jbx6244@gmail.com>
> Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
applied for 5.8
^ permalink raw reply
* Re: [PATCH v2] ARM: dts: enable WLAN for Mecer Xtreme Mini S6
From: Heiko Stuebner @ 2020-05-18 22:42 UTC (permalink / raw)
To: Rob Herring, Justin Swartz, Mark Rutland
Cc: Heiko Stuebner, linux-arm-kernel, devicetree, linux-kernel,
linux-rockchip
In-Reply-To: <20200406135006.23759-1-justin.swartz@risingedge.co.za>
On Mon, 6 Apr 2020 13:50:04 +0000, Justin Swartz wrote:
> The Mecer Xtreme Mini S6 features a wireless module, based on a
> Realtek 8723BS, which provides WLAN and Bluetooth connectivity via
> SDIO and UART interfaces respectively.
>
> Define a simple MMC power sequence that declares the GPIO pins
> connected to the module's WLAN Disable and Bluetooth Disable pins
> as active low reset signals, because both signals must be deasserted
> for WLAN radio operation.
>
> [...]
Applied, thanks!
[1/1] ARM: dts: enable WLAN for Mecer Xtreme Mini S6
commit: 6067ec2c7ffacab4689ddfed3df74a467d112efe
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply
* Re: [PATCH] arm64: dts: rockchip: add bus-width properties to mmc nodes for px30.dtsi
From: Heiko Stuebner @ 2020-05-18 22:42 UTC (permalink / raw)
To: Johan Jonker
Cc: Heiko Stuebner, linux-kernel, robh+dt, devicetree,
linux-arm-kernel, linux-rockchip
In-Reply-To: <20200416183053.6045-1-jbx6244@gmail.com>
On Thu, 16 Apr 2020 20:30:53 +0200, Johan Jonker wrote:
> 'bus-width' and pinctrl containing the bus-pins
> should be in the same file, so add them to
> all mmc nodes in 'px30.dtsi'.
Applied, thanks!
[1/1] arm64: dts: rockchip: add bus-width properties to mmc nodes for px30
commit: fb0ab17f1ab750d9662ec6b9fb3aa541a8ac1f5c
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply
* Re: [PATCH v4 6/6] ramoops: Add max_reason optional field to ramoops DT node
From: Rob Herring @ 2020-05-18 22:45 UTC (permalink / raw)
To: Kees Cook
Cc: Pavel Tatashin, Petr Mladek, Anton Vorontsov, Colin Cross,
Tony Luck, Jonathan Corbet, Benson Leung, Michael Ellerman,
Benjamin Herrenschmidt, Paul Mackerras, Enric Balletbo i Serra,
Sergey Senozhatsky, Steven Rostedt, Linux Doc Mailing List,
linux-kernel@vger.kernel.org, devicetree, linuxppc-dev
In-Reply-To: <20200515184434.8470-7-keescook@chromium.org>
On Fri, May 15, 2020 at 12:44 PM Kees Cook <keescook@chromium.org> wrote:
>
> From: Pavel Tatashin <pasha.tatashin@soleen.com>
Subject still has 'max_reason'.
>
> Currently, it is possible to dump kmsges for panic, or oops.
> With max_reason it is possible to dump messages for other
And here.
> kmesg_dump events, for example reboot, halt, shutdown, kexec.
>
> Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
> Link: https://lore.kernel.org/lkml/20200506211523.15077-6-keescook@chromium.org/
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> .../devicetree/bindings/reserved-memory/ramoops.txt | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt b/Documentation/devicetree/bindings/reserved-memory/ramoops.txt
> index 0eba562fe5c6..b7886fea368c 100644
> --- a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt
> +++ b/Documentation/devicetree/bindings/reserved-memory/ramoops.txt
> @@ -30,7 +30,7 @@ Optional properties:
> - ecc-size: enables ECC support and specifies ECC buffer size in bytes
> (defaults to 0: no ECC)
>
> -- record-size: maximum size in bytes of each dump done on oops/panic
> +- record-size: maximum size in bytes of each kmsg dump.
> (defaults to 0: disabled)
>
> - console-size: size in bytes of log buffer reserved for kernel messages
> @@ -45,7 +45,16 @@ Optional properties:
> - unbuffered: if present, use unbuffered mappings to map the reserved region
> (defaults to buffered mappings)
>
> -- no-dump-oops: if present, only dump panics (defaults to panics and oops)
> +- max-reason: if present, sets maximum type of kmsg dump reasons to store
> + (defaults to 2: log Oopses and Panics). This can be set to INT_MAX to
> + store all kmsg dumps. See include/linux/kmsg_dump.h KMSG_DUMP_* for other
> + kmsg dump reason values. Setting this to 0 (KMSG_DUMP_UNDEF), means the
> + reason filtering will be controlled by the printk.always_kmsg_dump boot
> + param: if unset, it will be KMSG_DUMP_OOPS, otherwise KMSG_DUMP_MAX.
> +
> +- no-dump-oops: deprecated, use max_reason instead. If present, and
> + max_reason is not specified, it is equivalent to max_reason = 1
And here (3 times).
> + (KMSG_DUMP_PANIC).
>
> - flags: if present, pass ramoops behavioral flags (defaults to 0,
> see include/linux/pstore_ram.h RAMOOPS_FLAG_* for flag values).
> --
> 2.20.1
>
^ permalink raw reply
* Re: [PATCH v5 0/1] Add rga to rk322x device tree
From: Heiko Stuebner @ 2020-05-18 22:52 UTC (permalink / raw)
To: Mark Rutland, Justin Swartz, Rob Herring
Cc: Heiko Stuebner, linux-arm-kernel, linux-kernel, devicetree,
linux-rockchip
In-Reply-To: <20200419125134.29923-1-justin.swartz@risingedge.co.za>
On Sun, 19 Apr 2020 12:51:32 +0000, Justin Swartz wrote:
> This patchset aims to enable use of Rockchip's RGA, a 2D raster
> graphic acceleration unit, on rk322x based devices.
>
> Changes in v5:
> - Remove the patch to rockchip-rga device tree binding documentation
> as Johan Jonker has already included mention of "rockchip,rk3228-rga"
> since the conversion to YAML.
>
> [...]
Applied, thanks!
[1/1] ARM: dts: rockchip: add rga node for rk322x
commit: 54b1a4e070330c3fba5becfb0b619bf360bc2657
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply
* Re: [PATCH v4 6/6] ramoops: Add max_reason optional field to ramoops DT node
From: Kees Cook @ 2020-05-18 23:04 UTC (permalink / raw)
To: Rob Herring
Cc: Pavel Tatashin, Petr Mladek, Anton Vorontsov, Colin Cross,
Tony Luck, Jonathan Corbet, Benson Leung, Michael Ellerman,
Benjamin Herrenschmidt, Paul Mackerras, Enric Balletbo i Serra,
Sergey Senozhatsky, Steven Rostedt, Linux Doc Mailing List,
linux-kernel@vger.kernel.org, devicetree, linuxppc-dev
In-Reply-To: <CAL_JsqLVgdUEP74nJOHOBD2abK=3YfCqX9GmL2iXdPNctcRdjw@mail.gmail.com>
On Mon, May 18, 2020 at 04:45:32PM -0600, Rob Herring wrote:
> On Fri, May 15, 2020 at 12:44 PM Kees Cook <keescook@chromium.org> wrote:
> >
> > From: Pavel Tatashin <pasha.tatashin@soleen.com>
>
> Subject still has 'max_reason'.
>
> >
> > Currently, it is possible to dump kmsges for panic, or oops.
> > With max_reason it is possible to dump messages for other
>
> And here.
Ah yeah, this was, I think, describing the internal field name, but I
see it would be less confusing to refer to this by the DT name. I will
adjust it. Thanks!
-Kees
>
> > kmesg_dump events, for example reboot, halt, shutdown, kexec.
> >
> > Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
> > Link: https://lore.kernel.org/lkml/20200506211523.15077-6-keescook@chromium.org/
> > Signed-off-by: Kees Cook <keescook@chromium.org>
> > ---
> > .../devicetree/bindings/reserved-memory/ramoops.txt | 13 +++++++++++--
> > 1 file changed, 11 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt b/Documentation/devicetree/bindings/reserved-memory/ramoops.txt
> > index 0eba562fe5c6..b7886fea368c 100644
> > --- a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt
> > +++ b/Documentation/devicetree/bindings/reserved-memory/ramoops.txt
> > @@ -30,7 +30,7 @@ Optional properties:
> > - ecc-size: enables ECC support and specifies ECC buffer size in bytes
> > (defaults to 0: no ECC)
> >
> > -- record-size: maximum size in bytes of each dump done on oops/panic
> > +- record-size: maximum size in bytes of each kmsg dump.
> > (defaults to 0: disabled)
> >
> > - console-size: size in bytes of log buffer reserved for kernel messages
> > @@ -45,7 +45,16 @@ Optional properties:
> > - unbuffered: if present, use unbuffered mappings to map the reserved region
> > (defaults to buffered mappings)
> >
> > -- no-dump-oops: if present, only dump panics (defaults to panics and oops)
> > +- max-reason: if present, sets maximum type of kmsg dump reasons to store
> > + (defaults to 2: log Oopses and Panics). This can be set to INT_MAX to
> > + store all kmsg dumps. See include/linux/kmsg_dump.h KMSG_DUMP_* for other
> > + kmsg dump reason values. Setting this to 0 (KMSG_DUMP_UNDEF), means the
> > + reason filtering will be controlled by the printk.always_kmsg_dump boot
> > + param: if unset, it will be KMSG_DUMP_OOPS, otherwise KMSG_DUMP_MAX.
> > +
> > +- no-dump-oops: deprecated, use max_reason instead. If present, and
> > + max_reason is not specified, it is equivalent to max_reason = 1
>
> And here (3 times).
>
> > + (KMSG_DUMP_PANIC).
> >
> > - flags: if present, pass ramoops behavioral flags (defaults to 0,
> > see include/linux/pstore_ram.h RAMOOPS_FLAG_* for flag values).
> > --
> > 2.20.1
> >
--
Kees Cook
^ permalink raw reply
* Re: [PATCH v3 2/7] dt-bindings: mdf: ti,j721e-syscon.yaml: Add J721e system controller
From: Rob Herring @ 2020-05-18 23:13 UTC (permalink / raw)
To: Roger Quadros
Cc: Tero Kristo, Kishon Vijay Abraham I, Nishanth Menon, Sekhar Nori,
Vignesh R, devicetree, linux-kernel@vger.kernel.org
In-Reply-To: <20200518145133.GA2280@bogus>
On Mon, May 18, 2020 at 8:51 AM Rob Herring <robh@kernel.org> wrote:
>
> On Fri, May 08, 2020 at 11:29:32AM +0300, Roger Quadros wrote:
> > Add DT binding schema for J721e system controller.
> >
> > Signed-off-by: Roger Quadros <rogerq@ti.com>
> > ---
> > .../bindings/mfd/ti,j721e-syscon.yaml | 69 +++++++++++++++++++
> > 1 file changed, 69 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/mfd/ti,j721e-syscon.yaml
>
> Use the compatible string for filename.
>
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/ti,j721e-syscon.yaml b/Documentation/devicetree/bindings/mfd/ti,j721e-syscon.yaml
> > new file mode 100644
> > index 000000000000..e832fb43f884
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mfd/ti,j721e-syscon.yaml
> > @@ -0,0 +1,69 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +# Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/mfd/ti,j721e-syscon.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: TI J721e System Controller Registers R/W Device Tree Bindings
> > +
> > +description: |
> > + This represents the Control Module registers (CTRL_MMR0) on the SoC.
> > + System controller node represents a register region containing a set
> > + of miscellaneous registers. The registers are not cohesive enough to
> > + represent as any specific type of device. The typical use-case is
> > + for some other node's driver, or platform-specific code, to acquire
> > + a reference to the syscon node (e.g. by phandle, node path, or
> > + search using a specific compatible value), interrogate the node (or
> > + associated OS driver) to determine the location of the registers,
> > + and access the registers directly.
> > +
> > +maintainers:
> > + - Kishon Vijay Abraham I <kishon@ti.com>
> > + - Roger Quadros <rogerq@ti.com
> > +
> > +allOf:
> > + - $ref: "syscon.yaml#"
>
> Drop this as it is not needed.
>
> > +
> > +properties:
> > + compatible:
> > + anyOf:
> > + - items:
> > + - enum:
> > + - ti,j721e-system-controller
> > +
> > + - const: syscon
>
> What about simple-mfd?
>
> > +
> > + - contains:
> > + const: syscon
> > + additionalItems: true
>
> Should be dropped.
>
> You are going to need a 'select' entry or this will match on any syscon
> or simple-mfd node:
>
> select:
> properties:
> compatible:
> contains:
> const: ti,j721e-system-controller
> required:
> - compatible
Sorry, forget the 'select' part (still should drop the 2nd clause).
I'd found a bug in what handles this automatically, but it's only when
you have 'simple-mfd' and not 'syscon'.
Rob
^ permalink raw reply
* Re: [PATCH] arm64: dts: qcom: sdm845-mtp: enable IPA
From: Bjorn Andersson @ 2020-05-18 23:24 UTC (permalink / raw)
To: Alex Elder
Cc: agross, evgreen, subashab, cpratapa, robh+dt, linux-arm-msm,
devicetree, open list
In-Reply-To: <20200518214834.9630-1-elder@linaro.org>
On Mon 18 May 14:48 PDT 2020, Alex Elder wrote:
> Enable IPA on the SDM845 MTP.
>
> Signed-off-by: Alex Elder <elder@linaro.org>
> ---
> arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
> index 1372fe8601f5..2f942daeb9d1 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
> @@ -448,6 +448,11 @@
> clock-frequency = <400000>;
> };
>
> +&ipa {
> + status = "okay";
> + modem-init;
modem-init tells the IPA driver that the modem will load the ipa_fws
firmware, but the MTP is assumed to run "LA" firmware where it's the
Linux-side's job to do this.
Regards,
Bjorn
> +};
> +
> &mdss {
> status = "okay";
> };
> --
> 2.20.1
>
^ permalink raw reply
* Re: [PATCH] arm64: dts: qcom: sc7180: add IPA information
From: Bjorn Andersson @ 2020-05-18 23:37 UTC (permalink / raw)
To: Alex Elder
Cc: agross, evgreen, subashab, cpratapa, robh+dt, linux-arm-msm,
devicetree, open list
In-Reply-To: <20200518214939.9730-1-elder@linaro.org>
On Mon 18 May 14:49 PDT 2020, Alex Elder wrote:
> Add IPA-related nodes and definitions to "sc7180.dtsi".
>
> Signed-off-by: Alex Elder <elder@linaro.org>
Applied
Thanks,
Bjorn
> ---
> arch/arm64/boot/dts/qcom/sc7180.dtsi | 51 ++++++++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index f1280e00b064..9a3686ce73ea 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -461,6 +461,17 @@
> interrupt-controller;
> #interrupt-cells = <2>;
> };
> +
> + ipa_smp2p_out: ipa-ap-to-modem {
> + qcom,entry-name = "ipa";
> + #qcom,smem-state-cells = <1>;
> + };
> +
> + ipa_smp2p_in: ipa-modem-to-ap {
> + qcom,entry-name = "ipa";
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> };
>
> psci {
> @@ -1007,6 +1018,46 @@
> qcom,bcm-voters = <&apps_bcm_voter>;
> };
>
> + ipa: ipa@1e40000 {
> + compatible = "qcom,sc7180-ipa";
> +
> + iommus = <&apps_smmu 0x440 0x3>;
> + reg = <0 0x1e40000 0 0x7000>,
> + <0 0x1e47000 0 0x2000>,
> + <0 0x1e04000 0 0x2c000>;
> + reg-names = "ipa-reg",
> + "ipa-shared",
> + "gsi";
> +
> + interrupts-extended = <&intc 0 311 IRQ_TYPE_EDGE_RISING>,
> + <&intc 0 432 IRQ_TYPE_LEVEL_HIGH>,
> + <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
> + <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
> + interrupt-names = "ipa",
> + "gsi",
> + "ipa-clock-query",
> + "ipa-setup-ready";
> +
> + clocks = <&rpmhcc RPMH_IPA_CLK>;
> + clock-names = "core";
> +
> + interconnects = <&aggre2_noc MASTER_IPA &mc_virt SLAVE_EBI1>,
> + <&aggre2_noc MASTER_IPA &system_noc SLAVE_IMEM>,
> + <&gem_noc MASTER_APPSS_PROC &config_noc SLAVE_IPA_CFG>;
> + interconnect-names = "memory",
> + "imem",
> + "config";
> +
> + qcom,smem-states = <&ipa_smp2p_out 0>,
> + <&ipa_smp2p_out 1>;
> + qcom,smem-state-names = "ipa-clock-enabled-valid",
> + "ipa-clock-enabled";
> +
> + modem-remoteproc = <&remoteproc_mpss>;
> +
> + status = "disabled";
> + };
> +
> tcsr_mutex_regs: syscon@1f40000 {
> compatible = "syscon";
> reg = <0 0x01f40000 0 0x40000>;
> --
> 2.20.1
>
^ permalink raw reply
* Re: [PATCH v7 4/5] remoteproc: ingenic: Added remoteproc driver
From: Bjorn Andersson @ 2020-05-18 23:57 UTC (permalink / raw)
To: Paul Cercueil
Cc: Ohad Ben-Cohen, Arnaud Pouliquen, od, linux-remoteproc,
devicetree, linux-kernel, Mathieu Poirier
In-Reply-To: <20200515104340.10473-4-paul@crapouillou.net>
On Fri 15 May 03:43 PDT 2020, Paul Cercueil wrote:
> This driver is used to boot, communicate with and load firmwares to the
> MIPS co-processor found in the VPU hardware of the JZ47xx SoCs from
> Ingenic.
>
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Series applied
Thanks,
Bjorn
> ---
>
> Notes:
> v2: Remove exception for always-mapped memories
> v3: - Use clk_bulk API
> - Move device-managed code to its own patch [3/4]
> - Move devicetree table right above ingenic_rproc_driver
> - Removed #ifdef CONFIG_OF around devicetree table
> - Removed .owner = THIS_MODULE in ingenic_rproc_driver
> - Removed useless platform_set_drvdata()
> v4: - Add fix reported by Julia
> - Change Kconfig symbol to INGENIC_VPU_RPROC
> - Add documentation to struct vpu
> - disable_irq_nosync() -> disable_irq()
> v5: No change
> v6: Instead of prepare/unprepare callbacks, use PM runtime callbacks
> v7: - Remove use of of_match_ptr()
> - Move Kconfig symbol so that it's in alphabetical order
> - Add missing doc for private structure field aux_base
> - Don't check for (len <= 0) in da_to_va()
> - Add missing \n in dev_info/dev_err messages
>
> drivers/remoteproc/Kconfig | 9 +
> drivers/remoteproc/Makefile | 1 +
> drivers/remoteproc/ingenic_rproc.c | 280 +++++++++++++++++++++++++++++
> 3 files changed, 290 insertions(+)
> create mode 100644 drivers/remoteproc/ingenic_rproc.c
>
> diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
> index fbaed079b299..c4d1731295eb 100644
> --- a/drivers/remoteproc/Kconfig
> +++ b/drivers/remoteproc/Kconfig
> @@ -23,6 +23,15 @@ config IMX_REMOTEPROC
>
> It's safe to say N here.
>
> +config INGENIC_VPU_RPROC
> + tristate "Ingenic JZ47xx VPU remoteproc support"
> + depends on MIPS || COMPILE_TEST
> + help
> + Say y or m here to support the VPU in the JZ47xx SoCs from Ingenic.
> +
> + This can be either built-in or a loadable module.
> + If unsure say N.
> +
> config MTK_SCP
> tristate "Mediatek SCP support"
> depends on ARCH_MEDIATEK
> diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile
> index 0effd3825035..e8b886e511f0 100644
> --- a/drivers/remoteproc/Makefile
> +++ b/drivers/remoteproc/Makefile
> @@ -10,6 +10,7 @@ remoteproc-y += remoteproc_sysfs.o
> remoteproc-y += remoteproc_virtio.o
> remoteproc-y += remoteproc_elf_loader.o
> obj-$(CONFIG_IMX_REMOTEPROC) += imx_rproc.o
> +obj-$(CONFIG_INGENIC_VPU_RPROC) += ingenic_rproc.o
> obj-$(CONFIG_MTK_SCP) += mtk_scp.o mtk_scp_ipi.o
> obj-$(CONFIG_OMAP_REMOTEPROC) += omap_remoteproc.o
> obj-$(CONFIG_WKUP_M3_RPROC) += wkup_m3_rproc.o
> diff --git a/drivers/remoteproc/ingenic_rproc.c b/drivers/remoteproc/ingenic_rproc.c
> new file mode 100644
> index 000000000000..189020d77b25
> --- /dev/null
> +++ b/drivers/remoteproc/ingenic_rproc.c
> @@ -0,0 +1,280 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Ingenic JZ47xx remoteproc driver
> + * Copyright 2019, Paul Cercueil <paul@crapouillou.net>
> + */
> +
> +#include <linux/bitops.h>
> +#include <linux/clk.h>
> +#include <linux/err.h>
> +#include <linux/interrupt.h>
> +#include <linux/io.h>
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +#include <linux/pm_runtime.h>
> +#include <linux/remoteproc.h>
> +
> +#include "remoteproc_internal.h"
> +
> +#define REG_AUX_CTRL 0x0
> +#define REG_AUX_MSG_ACK 0x10
> +#define REG_AUX_MSG 0x14
> +#define REG_CORE_MSG_ACK 0x18
> +#define REG_CORE_MSG 0x1C
> +
> +#define AUX_CTRL_SLEEP BIT(31)
> +#define AUX_CTRL_MSG_IRQ_EN BIT(3)
> +#define AUX_CTRL_NMI_RESETS BIT(2)
> +#define AUX_CTRL_NMI BIT(1)
> +#define AUX_CTRL_SW_RESET BIT(0)
> +
> +struct vpu_mem_map {
> + const char *name;
> + unsigned int da;
> +};
> +
> +struct vpu_mem_info {
> + const struct vpu_mem_map *map;
> + unsigned long len;
> + void __iomem *base;
> +};
> +
> +static const struct vpu_mem_map vpu_mem_map[] = {
> + { "tcsm0", 0x132b0000 },
> + { "tcsm1", 0xf4000000 },
> + { "sram", 0x132f0000 },
> +};
> +
> +/**
> + * struct vpu - Ingenic VPU remoteproc private structure
> + * @irq: interrupt number
> + * @clks: pointers to the VPU and AUX clocks
> + * @aux_base: raw pointer to the AUX interface registers
> + * @mem_info: array of struct vpu_mem_info, which contain the mapping info of
> + * each of the external memories
> + * @dev: private pointer to the device
> + */
> +struct vpu {
> + int irq;
> + struct clk_bulk_data clks[2];
> + void __iomem *aux_base;
> + struct vpu_mem_info mem_info[ARRAY_SIZE(vpu_mem_map)];
> + struct device *dev;
> +};
> +
> +static int ingenic_rproc_start(struct rproc *rproc)
> +{
> + struct vpu *vpu = rproc->priv;
> + u32 ctrl;
> +
> + enable_irq(vpu->irq);
> +
> + /* Reset the AUX and enable message IRQ */
> + ctrl = AUX_CTRL_NMI_RESETS | AUX_CTRL_NMI | AUX_CTRL_MSG_IRQ_EN;
> + writel(ctrl, vpu->aux_base + REG_AUX_CTRL);
> +
> + return 0;
> +}
> +
> +static int ingenic_rproc_stop(struct rproc *rproc)
> +{
> + struct vpu *vpu = rproc->priv;
> +
> + disable_irq(vpu->irq);
> +
> + /* Keep AUX in reset mode */
> + writel(AUX_CTRL_SW_RESET, vpu->aux_base + REG_AUX_CTRL);
> +
> + return 0;
> +}
> +
> +static void ingenic_rproc_kick(struct rproc *rproc, int vqid)
> +{
> + struct vpu *vpu = rproc->priv;
> +
> + writel(vqid, vpu->aux_base + REG_CORE_MSG);
> +}
> +
> +static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len)
> +{
> + struct vpu *vpu = rproc->priv;
> + void __iomem *va = NULL;
> + unsigned int i;
> +
> + for (i = 0; i < ARRAY_SIZE(vpu_mem_map); i++) {
> + const struct vpu_mem_info *info = &vpu->mem_info[i];
> + const struct vpu_mem_map *map = info->map;
> +
> + if (da >= map->da && (da + len) < (map->da + info->len)) {
> + va = info->base + (da - map->da);
> + break;
> + }
> + }
> +
> + return (__force void *)va;
> +}
> +
> +static struct rproc_ops ingenic_rproc_ops = {
> + .start = ingenic_rproc_start,
> + .stop = ingenic_rproc_stop,
> + .kick = ingenic_rproc_kick,
> + .da_to_va = ingenic_rproc_da_to_va,
> +};
> +
> +static irqreturn_t vpu_interrupt(int irq, void *data)
> +{
> + struct rproc *rproc = data;
> + struct vpu *vpu = rproc->priv;
> + u32 vring;
> +
> + vring = readl(vpu->aux_base + REG_AUX_MSG);
> +
> + /* Ack the interrupt */
> + writel(0, vpu->aux_base + REG_AUX_MSG_ACK);
> +
> + return rproc_vq_interrupt(rproc, vring);
> +}
> +
> +static void ingenic_rproc_disable_clks(void *data)
> +{
> + struct vpu *vpu = data;
> +
> + pm_runtime_resume(vpu->dev);
> + pm_runtime_disable(vpu->dev);
> +
> + clk_bulk_disable_unprepare(ARRAY_SIZE(vpu->clks), vpu->clks);
> +}
> +
> +static int ingenic_rproc_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct resource *mem;
> + struct rproc *rproc;
> + struct vpu *vpu;
> + unsigned int i;
> + int ret;
> +
> + rproc = devm_rproc_alloc(dev, "ingenic-vpu",
> + &ingenic_rproc_ops, NULL, sizeof(*vpu));
> + if (!rproc)
> + return -ENOMEM;
> +
> + vpu = rproc->priv;
> + vpu->dev = &pdev->dev;
> + platform_set_drvdata(pdev, vpu);
> +
> + mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "aux");
> + vpu->aux_base = devm_ioremap_resource(dev, mem);
> + if (IS_ERR(vpu->aux_base)) {
> + dev_err(dev, "Failed to ioremap\n");
> + return PTR_ERR(vpu->aux_base);
> + }
> +
> + for (i = 0; i < ARRAY_SIZE(vpu_mem_map); i++) {
> + mem = platform_get_resource_byname(pdev, IORESOURCE_MEM,
> + vpu_mem_map[i].name);
> +
> + vpu->mem_info[i].base = devm_ioremap_resource(dev, mem);
> + if (IS_ERR(vpu->mem_info[i].base)) {
> + ret = PTR_ERR(vpu->mem_info[i].base);
> + dev_err(dev, "Failed to ioremap\n");
> + return ret;
> + }
> +
> + vpu->mem_info[i].len = resource_size(mem);
> + vpu->mem_info[i].map = &vpu_mem_map[i];
> + }
> +
> + vpu->clks[0].id = "vpu";
> + vpu->clks[1].id = "aux";
> +
> + ret = devm_clk_bulk_get(dev, ARRAY_SIZE(vpu->clks), vpu->clks);
> + if (ret) {
> + dev_err(dev, "Failed to get clocks\n");
> + return ret;
> + }
> +
> + vpu->irq = platform_get_irq(pdev, 0);
> + if (vpu->irq < 0)
> + return vpu->irq;
> +
> + ret = devm_request_irq(dev, vpu->irq, vpu_interrupt, 0, "VPU", rproc);
> + if (ret < 0) {
> + dev_err(dev, "Failed to request IRQ\n");
> + return ret;
> + }
> +
> + disable_irq(vpu->irq);
> +
> + /* The clocks must be enabled for the firmware to be loaded in TCSM */
> + ret = clk_bulk_prepare_enable(ARRAY_SIZE(vpu->clks), vpu->clks);
> + if (ret) {
> + dev_err(dev, "Unable to start clocks\n");
> + return ret;
> + }
> +
> + pm_runtime_irq_safe(dev);
> + pm_runtime_set_active(dev);
> + pm_runtime_enable(dev);
> + pm_runtime_get_sync(dev);
> + pm_runtime_use_autosuspend(dev);
> +
> + ret = devm_add_action_or_reset(dev, ingenic_rproc_disable_clks, vpu);
> + if (ret) {
> + dev_err(dev, "Unable to register action\n");
> + goto out_pm_put;
> + }
> +
> + ret = devm_rproc_add(dev, rproc);
> + if (ret) {
> + dev_err(dev, "Failed to register remote processor\n");
> + goto out_pm_put;
> + }
> +
> +out_pm_put:
> + pm_runtime_put_autosuspend(dev);
> +
> + return ret;
> +}
> +
> +static const struct of_device_id ingenic_rproc_of_matches[] = {
> + { .compatible = "ingenic,jz4770-vpu-rproc", },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, ingenic_rproc_of_matches);
> +
> +static int __maybe_unused ingenic_rproc_suspend(struct device *dev)
> +{
> + struct vpu *vpu = dev_get_drvdata(dev);
> +
> + clk_bulk_disable(ARRAY_SIZE(vpu->clks), vpu->clks);
> +
> + return 0;
> +}
> +
> +static int __maybe_unused ingenic_rproc_resume(struct device *dev)
> +{
> + struct vpu *vpu = dev_get_drvdata(dev);
> +
> + return clk_bulk_enable(ARRAY_SIZE(vpu->clks), vpu->clks);
> +}
> +
> +static const struct dev_pm_ops __maybe_unused ingenic_rproc_pm = {
> + SET_RUNTIME_PM_OPS(ingenic_rproc_suspend, ingenic_rproc_resume, NULL)
> +};
> +
> +static struct platform_driver ingenic_rproc_driver = {
> + .probe = ingenic_rproc_probe,
> + .driver = {
> + .name = "ingenic-vpu",
> +#ifdef CONFIG_PM
> + .pm = &ingenic_rproc_pm,
> +#endif
> + .of_match_table = ingenic_rproc_of_matches,
> + },
> +};
> +module_platform_driver(ingenic_rproc_driver);
> +
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Paul Cercueil <paul@crapouillou.net>");
> +MODULE_DESCRIPTION("Ingenic JZ47xx Remote Processor control driver");
> --
> 2.26.2
>
^ permalink raw reply
* Re: [PATCH 1/4] clk/soc: mediatek: mt8183: Bind clock driver from platform device
From: Chun-Kuang Hu @ 2020-05-19 0:21 UTC (permalink / raw)
To: Matthias Brugger
Cc: Chun-Kuang Hu, matthias.bgg, Rob Herring, Michael Turquette,
Stephen Boyd, Kate Stewart, devicetree, Greg Kroah-Hartman,
linux-kernel, moderated list:ARM/Mediatek SoC support, Linux ARM,
mtk01761, Thomas Gleixner, linux-clk, Allison Randal,
Enric Balletbo i Serra
In-Reply-To: <d95bf802-4a9d-9791-cb0b-ba804d649045@gmail.com>
Hi, Matthias:
Matthias Brugger <matthias.bgg@gmail.com> 於 2020年5月18日 週一 下午11:57寫道:
>
>
>
> On 18/05/2020 17:30, Chun-Kuang Hu wrote:
> > Hi, Matthias:
> >
> > <matthias.bgg@kernel.org> 於 2020年5月18日 週一 下午7:32寫道:
> >>
> >> From: Matthias Brugger <matthias.bgg@gmail.com>
> >>
> >> The mmsys driver is now the top level entry point for the multimedia
> >> system (mmsys), we bind the clock driver by creating a platform device.
> >> We also bind the MediaTek DRM driver which is not yet implement and
> >> therefor will errror out for now.
> >
> > You may need to let CONFIG_MTK_MMSYS depends on
> > CONFIG_COMMON_CLK_MT8173_MMSYS || CONFIG_COMMON_CLK_MT8183_MMSYS
> >
>
> That will be fixed by:
> https://patchwork.kernel.org/patch/11469521/
>
> Otherwise this won't scale as we would need to add the SoCs using the mtk-mmsys
> driver and this will be a lot if not all.
I forgot that patch, so for this patch,
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
>
> Regards,
> Matthias
>
> > Regards,
> > Chun-Kuang.
> >
> >>
> >> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> >> ---
> >>
> >> drivers/clk/mediatek/clk-mt8183-mm.c | 9 ++-------
> >> drivers/soc/mediatek/mtk-mmsys.c | 8 ++++++++
> >> 2 files changed, 10 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/drivers/clk/mediatek/clk-mt8183-mm.c b/drivers/clk/mediatek/clk-mt8183-mm.c
> >> index 720c696b506d..9d60e09619c1 100644
> >> --- a/drivers/clk/mediatek/clk-mt8183-mm.c
> >> +++ b/drivers/clk/mediatek/clk-mt8183-mm.c
> >> @@ -84,8 +84,9 @@ static const struct mtk_gate mm_clks[] = {
> >>
> >> static int clk_mt8183_mm_probe(struct platform_device *pdev)
> >> {
> >> + struct device *dev = &pdev->dev;
> >> + struct device_node *node = dev->parent->of_node;
> >> struct clk_onecell_data *clk_data;
> >> - struct device_node *node = pdev->dev.of_node;
> >>
> >> clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK);
> >>
> >> @@ -95,16 +96,10 @@ static int clk_mt8183_mm_probe(struct platform_device *pdev)
> >> return of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
> >> }
> >>
> >> -static const struct of_device_id of_match_clk_mt8183_mm[] = {
> >> - { .compatible = "mediatek,mt8183-mmsys", },
> >> - {}
> >> -};
> >> -
> >> static struct platform_driver clk_mt8183_mm_drv = {
> >> .probe = clk_mt8183_mm_probe,
> >> .driver = {
> >> .name = "clk-mt8183-mm",
> >> - .of_match_table = of_match_clk_mt8183_mm,
> >> },
> >> };
> >>
> >> diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c
> >> index cacafe23c823..783c3dd008b2 100644
> >> --- a/drivers/soc/mediatek/mtk-mmsys.c
> >> +++ b/drivers/soc/mediatek/mtk-mmsys.c
> >> @@ -92,6 +92,10 @@ static const struct mtk_mmsys_driver_data mt8173_mmsys_driver_data = {
> >> .clk_driver = "clk-mt8173-mm",
> >> };
> >>
> >> +static const struct mtk_mmsys_driver_data mt8183_mmsys_driver_data = {
> >> + .clk_driver = "clk-mt8183-mm",
> >> +};
> >> +
> >> static unsigned int mtk_mmsys_ddp_mout_en(enum mtk_ddp_comp_id cur,
> >> enum mtk_ddp_comp_id next,
> >> unsigned int *addr)
> >> @@ -339,6 +343,10 @@ static const struct of_device_id of_match_mtk_mmsys[] = {
> >> .compatible = "mediatek,mt8173-mmsys",
> >> .data = &mt8173_mmsys_driver_data,
> >> },
> >> + {
> >> + .compatible = "mediatek,mt8183-mmsys",
> >> + .data = &mt8183_mmsys_driver_data,
> >> + },
> >> { }
> >> };
> >>
> >> --
> >> 2.26.2
> >>
> >>
> >> _______________________________________________
> >> Linux-mediatek mailing list
> >> Linux-mediatek@lists.infradead.org
> >> http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox