Initial support for Marvell MMP3 SoC
Subsystems (8)
Lubomir Rintel
reviewerv2 cover Initial support for Marvell MMP3 SoC
Hi,
this is a second spin of a patch set that adds support for the Marvell MMP3 processor. MMP3 is used in OLPC XO-4 laptops, Panasonic Toughpad FZ-A1 tablet and Dell Wyse 3020 Tx0D thin clients.
Compared to v1, there's a handful of fixes in response to reviews. Patch 02/20 is new. Details in individual patches.
Apart from the adjustments in mach-mmp/, the patch makes necessary changes to the irqchip driver and adds an USB2 PHY driver. The latter has a dependency on the mach-mmp/ changes, so it can't be submitted separately.
The patch set has been tested to work on Wyse Tx0D and not ruin MMP2 support on XO-1.75.
Thanks
Lubo
Lubomir Rintel
reviewerPATCH v2 1/20 dt-bindings: arm: cpu: Add Marvell MMP3 SMP enable method
Add the enable method for the second PJ4B core of the Marvell MMP3 SoC.
---
Changes since v1:
- Add Rob's Reviewed-by tag
Documentation/devicetree/bindings/arm/cpus.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/cpus.yaml +1 -0
@@ -186,6 +186,7 @@ properties: - marvell,armada-390-smp - marvell,armada-xp-smp - marvell,98dx3236-smp + - marvell,mmp3-smp - mediatek,mt6589-smp - mediatek,mt81xx-tz-smp - qcom,gcc-msm8660
Signature · 1 line
2.21.0
Lubomir Rintel
reviewerPATCH v2 2/20 dt-bindings: arm: Convert Marvell MMP board/soc bindings to json-schema
In reply to Lubomir RintelConvert Marvell MMP SoC bindings to DT schema format using json-schema.
---
Changes since v1:
- Added this patch
.../devicetree/bindings/arm/mrvl/mrvl.txt | 14 --------- .../devicetree/bindings/arm/mrvl/mrvl.yaml | 31 +++++++++++++++++++ 2 files changed, 31 insertions(+), 14 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/mrvl/mrvl.txt create mode 100644 Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml
Documentation/devicetree/bindings/arm/mrvl/mrvl.txt deleted +0 -14
@@ -1,14 +0,0 @@ -Marvell Platforms Device Tree Bindings ----------------------------------------------------- - -PXA168 Aspenite Board -Required root node properties: - - compatible = "mrvl,pxa168-aspenite", "mrvl,pxa168"; - -PXA910 DKB Board -Required root node properties: - - compatible = "mrvl,pxa910-dkb"; - -MMP2 Brownstone Board -Required root node properties: - - compatible = "mrvl,mmp2-brownstone", "mrvl,mmp2";
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +31 -0
@@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/mrvl/mrvl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Platforms Device Tree Bindings + +maintainers: + - Lubomir Rintel <[email protected]> + +properties: + $nodename: + const: '/' + compatible: + oneOf: + - description: PXA168 Aspenite Board + items: + - enum: + - mrvl,pxa168-aspenite + - const: mrvl,pxa168 + - description: PXA910 DKB Board + items: + - enum: + - mrvl,pxa910-dkb + - description: MMP2 Brownstone Board + items: + - enum: + - mrvl,mmp2-brownstone + - const: mrvl,mmp2 +...
Signature · 1 line
2.21.0
Re: [PATCH v2 02/20] dt-bindings: arm: Convert Marvell MMP board/soc bindings to json-schema
Quoted 56 lines · Lubomir Rintel
Convert Marvell MMP SoC bindings to DT schema format using json-schema.
Signed-off-by Lubomir Rintel <[email protected]>---
Changes since v1:
- Added this patch.../devicetree/bindings/arm/mrvl/mrvl.txt | 14 --------- .../devicetree/bindings/arm/mrvl/mrvl.yaml | 31 +++++++++++++++++++ 2 files changed, 31 insertions(+), 14 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/mrvl/mrvl.txt create mode 100644 Documentation/devicetree/bindings/arm/mrvl/mrvl.yamlDocumentation/devicetree/bindings/arm/mrvl/mrvl.txt deleted +0
-14@@ -1,14 +0,0 @@ -Marvell Platforms Device Tree Bindings ----------------------------------------------------- - -PXA168 Aspenite Board -Required root node properties: - - compatible = "mrvl,pxa168-aspenite", "mrvl,pxa168"; - -PXA910 DKB Board -Required root node properties: - - compatible = "mrvl,pxa910-dkb"; - -MMP2 Brownstone Board -Required root node properties: - - compatible = "mrvl,mmp2-brownstone", "mrvl,mmp2";Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +15
-0@@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/mrvl/mrvl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Platforms Device Tree Bindings + +maintainers: + - Lubomir Rintel <[email protected]> + +properties: + $nodename: + const: '/' + compatible:
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml line 25
Quoted 10 lines
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +10
-0+ oneOf: + - description: PXA168 Aspenite Board + items: + - enum: + - mrvl,pxa168-aspenite + - const: mrvl,pxa168 + - description: PXA910 DKB Board + items: + - enum: + - mrvl,pxa910-dkb
Doesn't match what's in dts file:
arch/arm/boot/dts/pxa910-dkb.dts: compatible =
"mrvl,pxa910-dkb", "mrvl,pxa910";
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml line 26
Quoted 1 line
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +1
-0+ - description: MMP2 Brownstone Board
If this entry is only for this board...
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml line 29
Quoted 3 lines
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +3
-0+ items: + - enum: + - mrvl,mmp2-brownstone
...then this can be a 'const' instead. Same for the others.
Quoted 5 lines
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +2
-1+ - const: mrvl,mmp2 +... --2.21.0
Lubomir Rintel
reviewerRe: [PATCH v2 02/20] dt-bindings: arm: Convert Marvell MMP board/soc bindings to json-schema
Quoted 69 lines · Rob Herring
Quoted 55 lines · Lubomir Rintel
Convert Marvell MMP SoC bindings to DT schema format using json-schema.
Signed-off-by Lubomir Rintel <[email protected]>---
Changes since v1:
- Added this patch.../devicetree/bindings/arm/mrvl/mrvl.txt | 14 --------- .../devicetree/bindings/arm/mrvl/mrvl.yaml | 31 +++++++++++++++++++ 2 files changed, 31 insertions(+), 14 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/mrvl/mrvl.txt create mode 100644 Documentation/devicetree/bindings/arm/mrvl/mrvl.yamlDocumentation/devicetree/bindings/arm/mrvl/mrvl.txt deleted +0
-14@@ -1,14 +0,0 @@ -Marvell Platforms Device Tree Bindings ----------------------------------------------------- - -PXA168 Aspenite Board -Required root node properties: - - compatible = "mrvl,pxa168-aspenite", "mrvl,pxa168"; - -PXA910 DKB Board -Required root node properties: - - compatible = "mrvl,pxa910-dkb"; - -MMP2 Brownstone Board -Required root node properties: - - compatible = "mrvl,mmp2-brownstone", "mrvl,mmp2";Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +15
-0@@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/mrvl/mrvl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Platforms Device Tree Bindings + +maintainers: + - Lubomir Rintel <[email protected]> + +properties: + $nodename: + const: '/' + compatible:Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml line 25
Quoted 10 lines
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +10
-0+ oneOf: + - description: PXA168 Aspenite Board + items: + - enum: + - mrvl,pxa168-aspenite + - const: mrvl,pxa168 + - description: PXA910 DKB Board + items: + - enum: + - mrvl,pxa910-dkbDoesn't match what's in dts file:
Quoted 2 lines
arch/arm/boot/dts/pxa910-dkb.dts: compatible =
"mrvl,pxa910-dkb", "mrvl,pxa910";
It corresponds to the .txt bindings specification this commit is converting. I thought it wouldn't be a good idea to do any changes to the contents at the time the conversion is done.
I also don't understand why does the dts file specify the board- specific compatible string. Surely "mrvl,pxa910" alone would be sufficient?
Quoted 9 lines
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml line 26
Quoted 1 line
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +1
-0+ - description: MMP2 Brownstone BoardIf this entry is only for this board...
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml line 29
Quoted 3 lines
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +3
-0+ items: + - enum: + - mrvl,mmp2-brownstone...then this can be a 'const' instead. Same for the others.
Sure, but is it preferable? I've actually done a "git grep -A3 enum Documentation/devicetree/bindings/" to see if the single-element is typically used and it seems like it is. Perhaps it's a good idea to indicate to a human reader that this is a list that's expected to eventually be extended with new elements.
In any case, there are more boards with MMP2 currently supported, notably the XO-1.75 laptop. I've actually sent out the dts file for review some time ago. I haven't added a separate compatible string for it because I thought it is not necessary (see above).
Quoted 4 lines
Quoted 4 lines
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +2
-1+ - const: mrvl,mmp2 +... --2.21.0
Thank you
Lubo
Re: [PATCH v2 02/20] dt-bindings: arm: Convert Marvell MMP board/soc bindings to json-schema
Quoted 71 lines · Lubomir Rintel
Quoted 69 lines · Rob Herring
Quoted 55 lines · Lubomir Rintel
Convert Marvell MMP SoC bindings to DT schema format using json-schema.
Signed-off-by Lubomir Rintel <[email protected]>---
Changes since v1:
- Added this patch.../devicetree/bindings/arm/mrvl/mrvl.txt | 14 --------- .../devicetree/bindings/arm/mrvl/mrvl.yaml | 31 +++++++++++++++++++ 2 files changed, 31 insertions(+), 14 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/mrvl/mrvl.txt create mode 100644 Documentation/devicetree/bindings/arm/mrvl/mrvl.yamlDocumentation/devicetree/bindings/arm/mrvl/mrvl.txt deleted +0
-14@@ -1,14 +0,0 @@ -Marvell Platforms Device Tree Bindings ----------------------------------------------------- - -PXA168 Aspenite Board -Required root node properties: - - compatible = "mrvl,pxa168-aspenite", "mrvl,pxa168"; - -PXA910 DKB Board -Required root node properties: - - compatible = "mrvl,pxa910-dkb"; - -MMP2 Brownstone Board -Required root node properties: - - compatible = "mrvl,mmp2-brownstone", "mrvl,mmp2";Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +15
-0@@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/mrvl/mrvl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Platforms Device Tree Bindings + +maintainers: + - Lubomir Rintel <[email protected]> + +properties: + $nodename: + const: '/' + compatible:Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml line 25
Quoted 10 lines
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +10
-0+ oneOf: + - description: PXA168 Aspenite Board + items: + - enum: + - mrvl,pxa168-aspenite + - const: mrvl,pxa168 + - description: PXA910 DKB Board + items: + - enum: + - mrvl,pxa910-dkbDoesn't match what's in dts file:
Quoted 6 lines
Quoted 2 lines
arch/arm/boot/dts/pxa910-dkb.dts: compatible =
"mrvl,pxa910-dkb", "mrvl,pxa910";It corresponds to the .txt bindings specification this commit is converting. I thought it wouldn't be a good idea to do any changes to the contents at the time the conversion is done.
There are so many errors like this, that it's fine to do it in the conversion. A separate patch is fine too.
Quoted 3 lines
I also don't understand why does the dts file specify the board- specific compatible string. Surely "mrvl,pxa910" alone would be sufficient?
To potentially work around any board specific issue without a dtb change.
Quoted 9 lines
Quoted 9 lines
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml line 26
Quoted 2 lines
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +1
-0+ - description: MMP2 Brownstone BoardIf this entry is only for this board...
Quoted 3 lines
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml new file +3
-0+ items: + - enum: + - mrvl,mmp2-brownstone
Quoted 7 lines
Quoted 1 line
...then this can be a 'const' instead. Same for the others.
Sure, but is it preferable? I've actually done a "git grep -A3 enum
Documentation/devicetree/bindings/" to see if the single-element is typically used and it seems like it is. Perhaps it's a good idea to indicate to a human reader that this is a list that's expected to eventually be extended with new elements.
Then the description should match and say 'MMP2 based boards'.
Quoted 4 lines
In any case, there are more boards with MMP2 currently supported, notably the XO-1.75 laptop. I've actually sent out the dts file for review some time ago. I haven't added a separate compatible string for it because I thought it is not necessary (see above).
You should add one.
Rob
Lubomir Rintel
reviewerPATCH v2 3/20 dt-bindings: arm: mrvl: Document MMP3 compatible string
In reply to Lubomir RintelMarvel MMP3 is a successor to MMP2, containing similar peripherals with two PJ4B cores.
---
Changes since v1:
- Rebased on top of mrvl.txt->mrvl.yaml conversion
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/arm/mrvl/mrvl.yaml +3 -0
@@ -28,4 +28,7 @@ properties: - enum: - mrvl,mmp2-brownstone - const: mrvl,mmp2 + - description: MMP3 SoC + items: + - const: mrvl,mmp3 ...
Signature · 1 line
2.21.0
Re: [PATCH v2 03/20] dt-bindings: arm: mrvl: Document MMP3 compatible string
Quoted 4 lines · Lubomir Rintel
Marvel MMP3 is a successor to MMP2, containing similar peripherals with two PJ4B cores.
Quoted 8 lines
Signed-off-by Lubomir Rintel <[email protected]>---
Changes since v1:
- Rebased on top ofmrvl.txt->mrvl.yamlconversionDocumentation/devicetree/bindings/arm/mrvl/mrvl.yaml | 3 +++ 1 file changed, 3 insertions(+)
Lubomir Rintel
reviewerPATCH v2 4/20 dt-bindings: mrvl,intc: Add a MMP3 interrupt controller
In reply to Lubomir RintelSimilar to MMP2 one, but has an extra range for the other core. The muxes stay the same.
---
Changes since v1:
- Reformat the compatible property documentation to higlight the valid combinations
- Drop an unneeded mmp3-intc example
.../bindings/interrupt-controller/mrvl,intc.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/interrupt-controller/mrvl,intc.txt +9 -5
@@ -1,13 +1,17 @@ * Marvell MMP Interrupt controller Required properties: -- compatible : Should be "mrvl,mmp-intc", "mrvl,mmp2-intc" or - "mrvl,mmp2-mux-intc" +- compatible : Should be + "mrvl,mmp-intc" on Marvel MMP, + "mrvl,mmp2-intc" along with "mrvl,mmp2-mux-intc" on MMP2 or + "marvell,mmp3-intc" with "mrvl,mmp2-mux-intc" on MMP3 - reg : Address and length of the register set of the interrupt controller. If the interrupt controller is intc, address and length means the range - of the whole interrupt controller. If the interrupt controller is mux-intc, - address and length means one register. Since address of mux-intc is in the - range of intc. mux-intc is secondary interrupt controller. + of the whole interrupt controller. The "marvell,mmp3-intc" controller + also has a secondary range for the second CPU core. If the interrupt + controller is mux-intc, address and length means one register. Since + address of mux-intc is in the range of intc. mux-intc is secondary + interrupt controller. - reg-names : Name of the register set of the interrupt controller. It's only required in mux-intc interrupt controller. - interrupts : Should be the port interrupt shared by mux interrupts. It's
Signature · 1 line
2.21.0
Re: [PATCH v2 04/20] dt-bindings: mrvl,intc: Add a MMP3 interrupt controller
Quoted 5 lines · Lubomir Rintel
Similar to MMP2 one, but has an extra range for the other core. The muxes stay the same.
Signed-off-by Lubomir Rintel <[email protected]>
Quoted 9 lines
---
Changes since v1:
- Reformat the compatible property documentation to higlight the valid combinations
- Drop an unneeded mmp3-intc example.../bindings/interrupt-controller/mrvl,intc.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
Lubomir Rintel
reviewerPATCH v2 5/20 dt-bindings: phy-mmp3-usb: Add bindings
In reply to Lubomir RintelThis is the PHY chip for USB OTG on MMP3 platform.
---
Changes since v1:
- s/usbphy@/usb-phy@/
- Dropped a reference to Documentation/phy.txt
.../devicetree/bindings/phy/phy-mmp3-usb.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-mmp3-usb.txt
Documentation/devicetree/bindings/phy/phy-mmp3-usb.txt new file +13 -0
@@ -0,0 +1,13 @@ +Marvell MMP3 USB PHY +-------------------- + +Required properties: +- compatible: must be "marvell,mmp3-usb-phy" +- #phy-cells: must be 0 + +Example: + usb-phy: usb-phy@d4207000 { + compatible = "marvell,mmp3-usb-phy"; + reg = <0xd4207000 0x40>; + #phy-cells = <0>; + };
Signature · 1 line
2.21.0
Re: [PATCH v2 05/20] dt-bindings: phy-mmp3-usb: Add bindings
Quoted 4 lines · Lubomir Rintel
This is the PHY chip for USB OTG on MMP3 platform.
Signed-off-by Lubomir Rintel <[email protected]>
Quoted 9 lines
---
Changes since v1:
- s/usbphy@/usb-phy@/
- Dropped a reference toDocumentation/phy.txt.../devicetree/bindings/phy/phy-mmp3-usb.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-mmp3-usb.txt
Lubomir Rintel
reviewerPATCH v2 6/20 irqchip/mmp: do not use of_address_to_resource() to get mux regs
In reply to Lubomir RintelThe "regs" property of the "mrvl,mmp2-mux-intc" devices are silly. They are offsets from intc's base, not addresses on the parent bus. At this point it probably can't be fixed.
On an OLPC XO-1.75 machine, the muxes are children of the intc, not the axi bus, and thus of_address_to_resource() won't work. We should treat the values as mere integers as opposed to bus addresses.
---
Changes since v4 of "MMP platform fixes" set:
- Add a comment, as suggested by Pavel
Changes since v1:
- Fix up typoes in the comment
- Do not allow the regs property be larger than the bindings document.
drivers/irqchip/irq-mmp.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-)
drivers/irqchip/irq-mmp.c +13 -9
@@ -424,9 +424,9 @@ IRQCHIP_DECLARE(mmp2_intc, "mrvl,mmp2-intc", mmp2_of_init);static int __init mmp2_mux_of_init (struct device_node *node,struct device_node *parent) { -struct resource res;int i, ret, irq, j =0 ;u32 nr_irqs, mfp_irq; +u32 reg[4 ];if (!parent)return -ENODEV ;
@@ -438,18 +438,22 @@ static int __init mmp2_mux_of_init(struct device_node *node,pr_err ("Not found mrvl,intc-nr-irqs property\n" );return -EINVAL ; } - ret =of_address_to_resource (node,0 , &res); + +/* +* For historical reasons, the "regs" property of the +* mrvl,mmp2-mux-intc is not a regular "regs" property containing +* addresses on the parent bus, but offsets from the intc's base. +* That is why we can't use of_address_to_resource() here. +*/ + ret =of_property_read_variable_u32_array (node,"reg" , reg, +ARRAY_SIZE (reg), +ARRAY_SIZE (reg));if (ret <0 ) {pr_err ("Not found reg property\n" );return -EINVAL ; } - icu_data[i].reg_status = mmp_icu_base + res.start; - ret =of_address_to_resource (node,1 , &res); -if (ret <0 ) { -pr_err ("Not found reg property\n" ); -return -EINVAL ; - } - icu_data[i].reg_mask = mmp_icu_base + res.start; + icu_data[i].reg_status = mmp_icu_base + reg[0 ]; + icu_data[i].reg_mask = mmp_icu_base + reg[2 ]; icu_data[i].cascade_irq =irq_of_parse_and_map (node,0 );if (!icu_data[i].cascade_irq)return -EINVAL ;
Signature · 1 line
2.21.0
[tip: irq/core] irqchip/mmp: Do not use of_address_to_resource() to get mux regs
The following commit has been merged into the irq/core branch of tip:
The following commit has been merged into the irq/core branch of tip:
Commit-ID: d6a95280ba169c3a3d632d983cc6977c544a06e8 Gitweb: https://git.kernel.org/tip/d6a95280ba169c3a3d632d983cc6977c544a06e8 Author: Lubomir Rintel <[email protected]> AuthorDate: Thu, 22 Aug 2019 11:26:29 +02:00 Committer: Marc Zyngier <[email protected]> CommitterDate: Fri, 30 Aug 2019 15:23:30 +01:00
irqchip/mmp: Do not use of_address_to_resource() to get mux regs
The "regs" property of the "mrvl,mmp2-mux-intc" devices are silly. They are offsets from intc's base, not addresses on the parent bus. At this point it probably can't be fixed.
On an OLPC XO-1.75 machine, the muxes are children of the intc, not the axi bus, and thus of_address_to_resource() won't work. We should treat the values as mere integers as opposed to bus addresses.
--- drivers/irqchip/irq-mmp.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-)
drivers/irqchip/irq-mmp.c +13 -9
@@ -422,9 +422,9 @@ IRQCHIP_DECLARE(mmp2_intc, "mrvl,mmp2-intc", mmp2_of_init);static int __init mmp2_mux_of_init (struct device_node *node,struct device_node *parent) { -struct resource res;int i, ret, irq, j =0 ;u32 nr_irqs, mfp_irq; +u32 reg[4 ];if (!parent)return -ENODEV ;
@@ -436,18 +436,22 @@ static int __init mmp2_mux_of_init(struct device_node *node,pr_err ("Not found mrvl,intc-nr-irqs property\n" );return -EINVAL ; } - ret =of_address_to_resource (node,0 , &res); -if (ret <0 ) { -pr_err ("Not found reg property\n" ); -return -EINVAL ; - } - icu_data[i].reg_status = mmp_icu_base + res.start; - ret =of_address_to_resource (node,1 , &res); + +/* +* For historical reasons, the "regs" property of the +* mrvl,mmp2-mux-intc is not a regular "regs" property containing +* addresses on the parent bus, but offsets from the intc's base. +* That is why we can't use of_address_to_resource() here. +*/ + ret =of_property_read_variable_u32_array (node,"reg" , reg, +ARRAY_SIZE (reg), +ARRAY_SIZE (reg));if (ret <0 ) {pr_err ("Not found reg property\n" );return -EINVAL ; } - icu_data[i].reg_mask = mmp_icu_base + res.start; + icu_data[i].reg_status = mmp_icu_base + reg[0 ]; + icu_data[i].reg_mask = mmp_icu_base + reg[2 ]; icu_data[i].cascade_irq =irq_of_parse_and_map (node,0 );if (!icu_data[i].cascade_irq)return -EINVAL ;
Re: [PATCH v2 06/20] irqchip/mmp: do not use of_address_to_resource() to get mux regs
In reply to Lubomir RintelQuoted 4 lines · Lubomir Rintel
The "regs" property of the "mrvl,mmp2-mux-intc" devices are silly. They are offsets from intc's base, not addresses on the parent bus. At this point it probably can't be fixed.
Another option is for platform code to fixup the live DT and just add 'ranges' to make this work.
Quoted 43 lines
On an OLPC XO-1.75 machine, the muxes are children of the intc, not the axi bus, and thus
of_address_to_resource()won't work. We should treat the values as mere integers as opposed to bus addresses.Signed-off-by Lubomir Rintel <[email protected]>Acked-by Pavel Machek <[email protected]>---
Changes since v4 of "MMP platform fixes" set:
- Add a comment, as suggested by PavelChanges since v1:
- Fix up typoes in the comment
- Do not allow the regs property be larger than the bindings document.drivers/irqchip/irq-mmp.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-)drivers/irqchip/irq-mmp.c +6
-2@@ -424,9 +424,9 @@ IRQCHIP_DECLARE(mmp2_intc, "mrvl,mmp2-intc", mmp2_of_init);static int __init mmp2_mux_of_init (struct device_node *node,struct device_node *parent) { -struct resource res;int i, ret, irq, j =0 ;u32 nr_irqs, mfp_irq; +u32 reg[4 ];if (!parent)return -ENODEV ;@@ -438,18 +438,22 @@ static int __init mmp2_mux_of_init(struct device_node *node,pr_err ("Not found mrvl,intc-nr-irqs property\n" );return -EINVAL ; } - ret =of_address_to_resource (node,0 , &res); + +/* +* For historical reasons, the "regs" property of the +* mrvl,mmp2-mux-intc is not a regular "regs" property containing +* addresses on the parent bus, but offsets from the intc's base.
drivers/irqchip/irq-mmp.c static int __init mmp2_mux_of_init(struct device_node *node, · line 446
Quoted 10 lines
drivers/irqchip/irq-mmp.c +5
-1+* That is why we can't use of_address_to_resource() here. +*/ + ret =of_property_read_variable_u32_array (node,"reg" , reg, +ARRAY_SIZE (reg), +ARRAY_SIZE (reg));if (ret <0 ) {pr_err ("Not found reg property\n" );return -EINVAL ; } - icu_data[i].reg_status = mmp_icu_base + res.start;
Seems like it was treated as an offset already?
drivers/irqchip/irq-mmp.c static int __init mmp2_mux_of_init(struct device_node *node, · line 456
Quoted 8 lines
drivers/irqchip/irq-mmp.c +2
-6- ret =of_address_to_resource (node,1 , &res); -if (ret <0 ) { -pr_err ("Not found reg property\n" ); -return -EINVAL ; - } - icu_data[i].reg_mask = mmp_icu_base + res.start; + icu_data[i].reg_status = mmp_icu_base + reg[0 ]; + icu_data[i].reg_mask = mmp_icu_base + reg[2 ];
This is a bit fragile as it's hard coding the cell sizes. Are they the same for all the platforms? I'd be more comfortable doing that in platform specific fixup code than here.
Rob
Re: [PATCH v2 06/20] irqchip/mmp: do not use of_address_to_resource() to get mux regs
Quoted 9 lines · Rob Herring
Quoted 4 lines · Lubomir Rintel
The "regs" property of the "mrvl,mmp2-mux-intc" devices are silly. They are offsets from intc's base, not addresses on the parent bus. At this point it probably can't be fixed.
Another option is for platform code to fixup the live DT and just add 'ranges' to make this work.
Nevermind my reply on this old thread. It caught my attention when looking for the other thread and I missed the date.
Rob
Lubomir Rintel
reviewerPATCH v2 7/20 irqchip/mmp: add missing chained_irq_{enter,exit}()
In reply to Lubomir RintelThe lack of chained_irq_exit() leaves the muxed interrupt masked on MMP3. For reasons unknown this is not a problem on MMP2.
---
Changes since v1:
- Use irq_desc_get_chip() instead of irq_get_chip()
drivers/irqchip/irq-mmp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/irqchip/irq-mmp.c +8 -1
@@ -13,6 +13,7 @@#include <linux/init.h> #include <linux/irq.h> #include <linux/irqchip.h> +#include <linux/irqchip/chained_irq.h> #include <linux/irqdomain.h> #include <linux/io.h> #include <linux/ioport.h>
@@ -132,11 +133,14 @@ struct irq_chip icu_irq_chip = {static void icu_mux_irq_demux (struct irq_desc *desc) {unsigned int irq =irq_desc_get_irq (desc); +struct irq_chip *chip =irq_desc_get_chip (desc);struct irq_domain *domain;struct icu_chip_data *data;int i;unsigned long mask, status, n; +chained_irq_enter (chip, desc); +for (i =1 ; i < max_icu_nr; i++) {if (irq == icu_data[i].cascade_irq) { domain = icu_data[i].domain;
@@ -146,7 +150,7 @@ static void icu_mux_irq_demux(struct irq_desc *desc) }if (i >= max_icu_nr) {pr_err ("Spurious irq %d in MMP INTC\n" , irq); -return ; + goto out; } mask =readl_relaxed (data->reg_mask);
@@ -158,6 +162,9 @@ static void icu_mux_irq_demux(struct irq_desc *desc)generic_handle_irq (icu_data[i].virq_base + n); } } + +out: +chained_irq_exit (chip, desc); } static int mmp_irq_domain_map(struct irq_domain *d, unsigned int irq,
Signature · 1 line
2.21.0
[tip: irq/core] irqchip/mmp: Add missing chained_irq_{enter,exit}()
The following commit has been merged into the irq/core branch of tip:
The following commit has been merged into the irq/core branch of tip:
Commit-ID: a46bc5fd8b205050ebbdccc6d5ca4124edb8dc6c Gitweb: https://git.kernel.org/tip/a46bc5fd8b205050ebbdccc6d5ca4124edb8dc6c Author: Lubomir Rintel <[email protected]> AuthorDate: Thu, 22 Aug 2019 11:26:30 +02:00 Committer: Marc Zyngier <[email protected]> CommitterDate: Fri, 30 Aug 2019 15:23:30 +01:00
irqchip/mmp: Add missing chained_irq_{enter,exit}()
The lack of chained_irq_exit() leaves the muxed interrupt masked on MMP3. For reasons unknown this is not a problem on MMP2.
--- drivers/irqchip/irq-mmp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/irqchip/irq-mmp.c +8 -1
@@ -13,6 +13,7 @@#include <linux/init.h> #include <linux/irq.h> #include <linux/irqchip.h> +#include <linux/irqchip/chained_irq.h> #include <linux/irqdomain.h> #include <linux/io.h> #include <linux/ioport.h>
@@ -132,11 +133,14 @@ struct irq_chip icu_irq_chip = {static void icu_mux_irq_demux (struct irq_desc *desc) {unsigned int irq =irq_desc_get_irq (desc); +struct irq_chip *chip =irq_desc_get_chip (desc);struct irq_domain *domain;struct icu_chip_data *data;int i;unsigned long mask, status, n; +chained_irq_enter (chip, desc); +for (i =1 ; i < max_icu_nr; i++) {if (irq == icu_data[i].cascade_irq) { domain = icu_data[i].domain;
@@ -146,7 +150,7 @@ static void icu_mux_irq_demux(struct irq_desc *desc) }if (i >= max_icu_nr) {pr_err ("Spurious irq %d in MMP INTC\n" , irq); -return ; + goto out; } mask =readl_relaxed (data->reg_mask);
@@ -158,6 +162,9 @@ static void icu_mux_irq_demux(struct irq_desc *desc)generic_handle_irq (icu_data[i].virq_base + n); } } + +out: +chained_irq_exit (chip, desc); } static int mmp_irq_domain_map(struct irq_domain *d, unsigned int irq,
Lubomir Rintel
reviewerPATCH v2 8/20 irqchip/mmp: mask off interrupts from other cores
In reply to Lubomir RintelFrom: Andres Salomon <[email protected]>
On mmp3, there's an extra set of ICU registers (ICU2) that handle interrupts on the extra cores. When masking off interrupts on MP1, these should be masked as well.
We add a new interrupt controller via device tree to identify when we're looking at an mmp3 machine via compatible field of "marvell,mmp3-intc".
[[email protected]: Changed "mrvl,mmp3-intc" compatible strings to "marvell,mmp3-intc". Tidied up the subject line a bit.]
--
Changes since v1:
- Moved mmp3-specific mmp_icu2_base initialization from mmp_init_bases() to mmp3_of_init() so that we don't have to check for marvell,mmp3-intc compatibility twice.
- Drop an superfluous call to irq_set_default_host()
arch/arm/mach-mmp/regs-icu.h | 3 +++ drivers/irqchip/irq-mmp.c | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+)
arch/arm/mach-mmp/regs-icu.h +3 -0
@@ -11,6 +11,9 @@#define ICU_VIRT_BASE (AXI_VIRT_BASE + 0x82000)#define ICU_REG (x) (ICU_VIRT_BASE + (x)) +#define ICU2_VIRT_BASE (AXI_VIRT_BASE + 0x84000) +#define ICU2_REG (x) (ICU2_VIRT_BASE + (x)) +#define ICU_INT_CONF (n) ICU_REG((n) << 2)#define ICU_INT_CONF_MASK (0xf)
drivers/irqchip/irq-mmp.c +48 -0
81 lines not on this page · raw message
Signature · 1 line
2.21.0
[tip: irq/core] irqchip/mmp: Mask off interrupts from other cores
The following commit has been merged into the irq/core branch of tip:
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 9e8e8912b05f276dd02d39cb596dc3cf03718377 Gitweb: https://git.kernel.org/tip/9e8e8912b05f276dd02d39cb596dc3cf03718377 Author: Andres Salomon <[email protected]> AuthorDate: Thu, 22 Aug 2019 11:26:31 +02:00 Committer: Marc Zyngier <[email protected]> CommitterDate: Fri, 30 Aug 2019 15:23:30 +01:00
irqchip/mmp: Mask off interrupts from other cores
On mmp3, there's an extra set of ICU registers (ICU2) that handle interrupts on the extra cores. When masking off interrupts on MP1, these should be masked as well.
We add a new interrupt controller via device tree to identify when we're looking at an mmp3 machine via compatible field of "marvell,mmp3-intc".
[[email protected]: Changed "mrvl,mmp3-intc" compatible strings to "marvell,mmp3-intc". Tidied up the subject line a bit.]
--
Changes since v1:
- Moved mmp3-specific mmp_icu2_base initialization from mmp_init_bases() to mmp3_of_init() so that we don't have to check for marvell,mmp3-intc compatibility twice.
- Drop an superfluous call to irq_set_default_host()
arch/arm/mach-mmp/regs-icu.h | 3 +++ drivers/irqchip/irq-mmp.c | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+)
--- arch/arm/mach-mmp/regs-icu.h | 3 ++- drivers/irqchip/irq-mmp.c | 48 +++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+)
arch/arm/mach-mmp/regs-icu.h +3 -0
@@ -11,6 +11,9 @@#define ICU_VIRT_BASE (AXI_VIRT_BASE + 0x82000)#define ICU_REG (x) (ICU_VIRT_BASE + (x)) +#define ICU2_VIRT_BASE (AXI_VIRT_BASE + 0x84000) +#define ICU2_REG (x) (ICU2_VIRT_BASE + (x)) +#define ICU_INT_CONF (n) ICU_REG((n) << 2)#define ICU_INT_CONF_MASK (0xf)
drivers/irqchip/irq-mmp.c +48 -0
81 lines not on this page · raw message
Lubomir Rintel
reviewerPATCH v2 9/20 irqchip/mmp: coexist with GIC root IRQ controller
In reply to Lubomir RintelOn MMP3, the GIC can be set as a root IRQ interrupt controller. If the device tree indicated that GIC is enabled, avoid hooking up mmp2_handle_irq().
The interrupt muxes are still being used.
--- drivers/irqchip/irq-mmp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/irqchip/irq-mmp.c +6 -1
@@ -470,7 +470,12 @@ static int __init mmp3_of_init(struct device_node *node, icu_data[0 ].conf_disable = mmp3_conf.conf_disable; icu_data[0 ].conf_mask = mmp3_conf.conf_mask; icu_data[0 ].conf2_mask = mmp3_conf.conf2_mask; -set_handle_irq (mmp2_handle_irq); + +if (!parent) { +/* This is the main interrupt controller. */ +set_handle_irq (mmp2_handle_irq); + } + max_icu_nr =1 ;return 0 ; }
Signature · 1 line
2.21.0
[tip: irq/core] irqchip/mmp: Coexist with GIC root IRQ controller
The following commit has been merged into the irq/core branch of tip:
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 2178add02238f8352f5b3294a79f4763183aade6 Gitweb: https://git.kernel.org/tip/2178add02238f8352f5b3294a79f4763183aade6 Author: Lubomir Rintel <[email protected]> AuthorDate: Thu, 22 Aug 2019 11:26:32 +02:00 Committer: Marc Zyngier <[email protected]> CommitterDate: Fri, 30 Aug 2019 15:23:30 +01:00
irqchip/mmp: Coexist with GIC root IRQ controller
On MMP3, the GIC can be set as a root IRQ interrupt controller. If the device tree indicated that GIC is enabled, avoid hooking up mmp2_handle_irq().
The interrupt muxes are still being used.
--- drivers/irqchip/irq-mmp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/irqchip/irq-mmp.c +6 -1
@@ -468,7 +468,12 @@ static int __init mmp3_of_init(struct device_node *node, icu_data[0 ].conf_disable = mmp3_conf.conf_disable; icu_data[0 ].conf_mask = mmp3_conf.conf_mask; icu_data[0 ].conf2_mask = mmp3_conf.conf2_mask; -set_handle_irq (mmp2_handle_irq); + +if (!parent) { +/* This is the main interrupt controller. */ +set_handle_irq (mmp2_handle_irq); + } + max_icu_nr =1 ;return 0 ; }
Lubomir Rintel
reviewerPATCH v2 10/20 ARM: l2c: add definition for FWA in PL310 aux register
In reply to Lubomir RintelThe PL310 also has a "Force write allocate" bits in the Auxiliary Control Register.
--- arch/arm/include/asm/hardware/cache-l2x0.h | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/include/asm/hardware/cache-l2x0.h +2 -0
@@ -118,6 +118,8 @@#define L310_AUX_CTRL_STORE_LIMITATION BIT(11)/* R2P0+ */ #define L310_AUX_CTRL_EXCLUSIVE_CACHE BIT(12)#define L310_AUX_CTRL_ASSOCIATIVITY_16 BIT(16) +#define L310_AUX_CTRL_FWA_SHIFT 23 +#define L310_AUX_CTRL_FWA_MASK (3 << 23)#define L310_AUX_CTRL_CACHE_REPLACE_RR BIT(25)/* R2P0+ */ #define L310_AUX_CTRL_NS_LOCKDOWN BIT(26)#define L310_AUX_CTRL_NS_INT_CTRL BIT(27)
Signature · 1 line
2.21.0
Lubomir Rintel
reviewerPATCH v2 11/20 ARM: mmp: don't select CACHE_TAUROS2 on all ARCH_MMP
In reply to Lubomir RintelMMP3 has a PJ4B with a Tauros 3 cache controller that uses CACHE_L2X0 instead, while CACHE_TAUROS2 is present on PJ4 and PJ1 (Mohawk) based platforms only.
--- arch/arm/mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mm/Kconfig +1 -1
@@ -1045,7 +1045,7 @@ endif config CACHE_TAUROS2 bool "Enable the Tauros2 L2 cache controller" - depends on (ARCH_DOVE || ARCH_MMP || CPU_PJ4) + depends on (CPU_MOHAWK || CPU_PJ4) default y select OUTER_CACHE help
Signature · 1 line
2.21.0
Lubomir Rintel
reviewerPATCH v2 12/20 ARM: mmp: map the PGU as well
In reply to Lubomir RintelThe MMP2 and later includes a system control unit in this area. We'll need that to initialize the secondary core on MMP3.
--- arch/arm/mach-mmp/addr-map.h | 7 +++++++ arch/arm/mach-mmp/common.c | 15 +++++++++++++++ arch/arm/mach-mmp/common.h | 1 + arch/arm/mach-mmp/mmp2-dt.c | 2 +- 4 files changed, 24 insertions(+), 1 deletion(-)
arch/arm/mach-mmp/addr-map.h +7 -0
@@ -20,6 +20,10 @@#define AXI_VIRT_BASE IOMEM(0xfe200000)#define AXI_PHYS_SIZE 0x00200000 +#define PGU_PHYS_BASE 0xe0000000 +#define PGU_VIRT_BASE IOMEM(0xfe400000) +#define PGU_PHYS_SIZE 0x00100000 +/* Static Memory Controller - Chip Select 0 and 1 */ #define SMC_CS0_PHYS_BASE 0x80000000#define SMC_CS0_PHYS_SIZE 0x10000000
@@ -38,4 +42,7 @@#define CIU_VIRT_BASE (AXI_VIRT_BASE + 0x82c00)#define CIU_REG (x) (CIU_VIRT_BASE + (x)) +#define SCU_VIRT_BASE (PGU_VIRT_BASE) +#define SCU_REG (x) (SCU_VIRT_BASE + (x)) +#endif /* __ASM_MACH_ADDR_MAP_H */
arch/arm/mach-mmp/common.c +15 -0
@@ -36,6 +36,15 @@ static struct map_desc standard_io_desc[] __initdata = { }, }; +static struct map_desc mmp2_io_desc[]__initdata = { + { + .pfn =__phys_to_pfn (PGU_PHYS_BASE ), + .virtual = (unsigned long )PGU_VIRT_BASE , + .length =PGU_PHYS_SIZE , + .type =MT_DEVICE , + }, +}; +void __init mmp_map_io (void ) {iotable_init (standard_io_desc,ARRAY_SIZE (standard_io_desc));
@@ -44,6 +53,12 @@ void __init mmp_map_io(void) mmp_chip_id =__raw_readl (MMP_CHIPID ); } +void __init mmp2_map_io (void ) +{ +mmp_map_io (); +iotable_init (mmp2_io_desc,ARRAY_SIZE (mmp2_io_desc)); +} +void mmp_restart (enum reboot_mode mode,const char *cmd) {soft_restart (0 );
arch/arm/mach-mmp/common.h +1 -0
@@ -5,4 +5,5 @@extern void mmp_timer_init (int irq,unsigned long rate);extern void __init mmp_map_io (void ); +extern void __init mmp2_map_io (void );extern void mmp_restart (enum reboot_mode ,const char *);
arch/arm/mach-mmp/mmp2-dt.c +1 -1
@@ -33,7 +33,7 @@ static const char *const mmp2_dt_board_compat[] __initconst = { };DT_MACHINE_START (MMP2_DT ,"Marvell MMP2 (Device Tree Support)" ) - .map_io = mmp_map_io, + .map_io = mmp2_map_io, .init_time = mmp_init_time, .dt_compat = mmp2_dt_board_compat,MACHINE_END
Signature · 1 line
2.21.0
Lubomir Rintel
reviewerPATCH v2 13/20 ARM: mmp: DT: convert timer driver to use TIMER_OF_DECLARE
In reply to Lubomir RintelThis makes things just a tiny bit simpler.
--- arch/arm/mach-mmp/mmp-dt.c | 5 ++--- arch/arm/mach-mmp/mmp2-dt.c | 5 ++--- arch/arm/mach-mmp/time.c | 38 +++++++++++-------------------------- 3 files changed, 15 insertions(+), 33 deletions(-)
arch/arm/mach-mmp/mmp-dt.c +2 -3
@@ -9,14 +9,13 @@#include <linux/irqchip.h> #include <linux/of_platform.h> #include <linux/clk-provider.h> +#include <linux/clocksource.h> #include <asm/mach/arch.h> #include <asm/mach/time.h> #include <asm/hardware/cache-tauros2.h> #include "common.h" -extern void __init mmp_dt_init_timer (void ); -static const char *const pxa168_dt_board_compat[]__initconst = {"mrvl,pxa168-aspenite" ,NULL ,
@@ -32,8 +31,8 @@ static void __init mmp_init_time(void)#ifdef CONFIG_CACHE_TAUROS2 tauros2_init (0 );#endif -mmp_dt_init_timer ();of_clk_init (NULL ); +timer_probe (); }DT_MACHINE_START (PXA168_DT ,"Marvell PXA168 (Device Tree Support)" )
arch/arm/mach-mmp/mmp2-dt.c +2 -3
@@ -10,21 +10,20 @@#include <linux/irqchip.h> #include <linux/of_platform.h> #include <linux/clk-provider.h> +#include <linux/clocksource.h> #include <asm/mach/arch.h> #include <asm/mach/time.h> #include <asm/hardware/cache-tauros2.h> #include "common.h" -extern void __init mmp_dt_init_timer (void ); -static void __init mmp_init_time (void ) {#ifdef CONFIG_CACHE_TAUROS2 tauros2_init (0 );#endif of_clk_init (NULL ); -mmp_dt_init_timer (); +timer_probe (); }static const char *const mmp2_dt_board_compat[]__initconst = {
arch/arm/mach-mmp/time.c +11 -27
@@ -195,30 +195,17 @@ void __init mmp_timer_init(int irq, unsigned long rate)clockevents_config_and_register (&ckevt, rate,MIN_DELTA ,MAX_DELTA ); } -#ifdef CONFIG_OF -static const struct of_device_id mmp_timer_dt_ids[] = { - { .compatible ="mrvl,mmp-timer" , }, - {} -}; - -void __init mmp_dt_init_timer (void ) +static int __init mmp_dt_init_timer (struct device_node *np) { -struct device_node *np;struct clk *clk;int irq, ret;unsigned long rate; - np =of_find_matching_node (NULL , mmp_timer_dt_ids); -if (!np) { - ret = -ENODEV ; - goto out; - } - clk =of_clk_get (np,0 );if (!IS_ERR (clk)) { ret =clk_prepare_enable (clk);if (ret) - goto out; +return ret; rate =clk_get_rate (clk) /2 ; }else if (cpu_is_pj4 ()) { rate =6500000 ;
@@ -227,18 +214,15 @@ void __init mmp_dt_init_timer(void) } irq =irq_of_parse_and_map (np,0 ); -if (!irq) { - ret = -EINVAL ; - goto out; - } +if (!irq) +return -EINVAL ; + mmp_timer_base =of_iomap (np,0 ); -if (!mmp_timer_base) { - ret = -ENOMEM ; - goto out; - } +if (!mmp_timer_base) +return -ENOMEM ; +mmp_timer_init (irq, rate); -return ; -out: -pr_err ("Failed to get timer from device tree with error:%d\n" , ret); +return 0 ; } -#endif + +TIMER_OF_DECLARE (mmp_timer,"mrvl,mmp-timer" , mmp_dt_init_timer);
Signature · 1 line
2.21.0
Lubomir Rintel
reviewerPATCH v2 14/20 ARM: mmp: define MMP_CHIPID by the means of CIU_REG()
In reply to Lubomir RintelA rather trivial cosmetic improvement.
--- arch/arm/mach-mmp/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mmp/common.c +1 -1
@@ -17,7 +17,7 @@#include "common.h" -#define MMP_CHIPID (AXI_VIRT_BASE + 0x82c00) +#define MMP_CHIPID CIU_REG(0x00)unsigned int mmp_chip_id;EXPORT_SYMBOL (mmp_chip_id);
Signature · 1 line
2.21.0
Lubomir Rintel
reviewerPATCH v2 15/20 ARM: mmp: add support for MMP3 SoC
In reply to Lubomir RintelSimilar to MMP2, which this patch is based on. Known differencies from MMP2 are:
* Two PJ4B cores instead of one PJ4
* Tauros 3 L2 cache controller instead of Tauros 2
* A GIC interrupt controller optionally used instead of the MMP one
* A TWD local timer
* Different USB2 PHY
* A USB3 SS controller
* More interrupt muxes
Hard to tell what else is different, because documentation is not available.
---
Changes since v1:
- Add CONFIG_COMMON_CLK_MMP2 to streamline the Makefile rule a tiny bit.
arch/arm/mach-mmp/Kconfig | 22 ++++++++++++++++++++-- arch/arm/mach-mmp/Makefile | 1 + arch/arm/mach-mmp/cputype.h | 27 +++++++++++++++++++++++++++ arch/arm/mach-mmp/mmp3.c | 29 +++++++++++++++++++++++++++++ arch/arm/mach-mmp/time.c | 3 ++- drivers/clk/Kconfig | 5 +++++ drivers/clk/mmp/Makefile | 2 +- 7 files changed, 85 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-mmp/mmp3.c
arch/arm/mach-mmp/Kconfig +20 -2
@@ -1,13 +1,13 @@ # SPDX-License-Identifier: GPL-2.0-only menuconfig ARCH_MMP - bool "Marvell PXA168/910/MMP2" + bool "Marvell PXA168/910/MMP2/MMP3" depends on ARCH_MULTI_V5 || ARCH_MULTI_V7 select GPIO_PXA select GPIOLIB select PINCTRL select PLAT_PXA help - Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line. + Support for Marvell's PXA168/PXA910(MMP), MMP2, and MMP3 processor lines. if ARCH_MMP
@@ -129,6 +129,24 @@ config MACH_MMP2_DT Include support for Marvell MMP2 based platforms using the device tree. +config MACH_MMP3_DT + bool "Support MMP3 (ARMv7) platforms" + depends on ARCH_MULTI_V7 + select ARM_GIC + select HAVE_ARM_SCU if SMP + select HAVE_ARM_TWD if SMP + select CACHE_L2X0 + select PINCTRL + select PINCTRL_SINGLE + select ARCH_HAS_RESET_CONTROLLER + select CPU_PJ4B + select PM_GENERIC_DOMAINS if PM + select PM_GENERIC_DOMAINS_OF if PM && OF + help + Say 'Y' here if you want to include support for platforms + with Marvell MMP3 processor, also known as PXA2128 or + Armada 620. + endmenu config CPU_PXA168
arch/arm/mach-mmp/Makefile +1 -0
@@ -34,5 +34,6 @@ obj-$(CONFIG_MACH_FLINT) += flint.o obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o obj-$(CONFIG_MACH_MMP_DT) += mmp-dt.o obj-$(CONFIG_MACH_MMP2_DT) += mmp2-dt.o +obj-$(CONFIG_MACH_MMP3_DT) += mmp3.o obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o obj-$(CONFIG_MACH_GPLUGD) += gplugd.o
arch/arm/mach-mmp/cputype.h +27 -0
@@ -18,6 +18,8 @@* MMP2 Z0 0x560f5811 0x00F00410 * MMP2 Z1 0x560f5811 0x00E00410 * MMP2 A0 0x560f5811 0x00A0A610 +* MMP3 A0 0x562f5842 0x00A02128 +* MMP3 B0 0x562f5842 0x00B02128 */ extern unsigned int mmp_chip_id;
@@ -55,4 +57,29 @@ static inline int cpu_is_mmp2(void)#define cpu_is_mmp2 () (0)#endif +#ifdef CONFIG_MACH_MMP3_DT +static inline int cpu_is_mmp3 (void ) +{ +return (((read_cpuid_id () >>8 ) &0xff ) ==0x58 ) && + ((mmp_chip_id &0xffff ) ==0x2128 ); +} + +static inline int cpu_is_mmp3_a0 (void ) +{ +return (cpu_is_mmp3 () && + ((mmp_chip_id &0x00ff0000 ) ==0x00a00000 )); +} + +static inline int cpu_is_mmp3_b0 (void ) +{ +return (cpu_is_mmp3 () && + ((mmp_chip_id &0x00ff0000 ) ==0x00b00000 )); +} + +#else +#define cpu_is_mmp3 () (0) +#define cpu_is_mmp3_a0 () (0) +#define cpu_is_mmp3_b0 () (0) +#endif +#endif /* __ASM_MACH_CPUTYPE_H */
arch/arm/mach-mmp/mmp3.c new file +29 -0
@@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* +* Marvell MMP3 aka PXA2128 aka 88AP2128 support +* +* Copyright (C) 2019 Lubomir Rintel <[email protected]> +*/ + +#include <linux/io.h> +#include <linux/irqchip.h> +#include <linux/of_platform.h> +#include <linux/clk-provider.h> +#include <asm/mach/arch.h> +#include <asm/hardware/cache-l2x0.h> + +#include "common.h" + +static const char *const mmp3_dt_board_compat[]__initconst = { +"marvell,mmp3" , +NULL , +}; + +DT_MACHINE_START (MMP2_DT ,"Marvell MMP3" ) + .map_io = mmp2_map_io, + .dt_compat = mmp3_dt_board_compat, + .l2c_aux_val =1 <<L310_AUX_CTRL_FWA_SHIFT | +L310_AUX_CTRL_DATA_PREFETCH | + L310_AUX_CTRL_INSTR_PREFETCH, + .l2c_aux_mask =0xc20fffff , +MACHINE_END
arch/arm/mach-mmp/time.c +2 -1
@@ -155,7 +155,8 @@ static void __init timer_config(void)__raw_writel (0x0 , mmp_timer_base +TMR_CER );/* disable */ - ccr &= (cpu_is_mmp2 ()) ? (TMR_CCR_CS_0 (0 ) |TMR_CCR_CS_1 (0 )) : + ccr &= (cpu_is_mmp2 () ||cpu_is_mmp3 ()) ? + (TMR_CCR_CS_0 (0 ) |TMR_CCR_CS_1 (0 )) : (TMR_CCR_CS_0 (3 ) |TMR_CCR_CS_1 (3 ));__raw_writel (ccr, mmp_timer_base +TMR_CCR );
drivers/clk/Kconfig +5 -0
@@ -301,6 +301,11 @@ config COMMON_CLK_STM32H7 ---help--- Support for stm32h7 SoC family clocks +config COMMON_CLK_MMP2 + def_bool COMMON_CLK && (MACH_MMP2_DT || MACH_MMP3_DT) + help + Support for Marvell MMP2 and MMP3 SoC clocks + config COMMON_CLK_BD718XX tristate "Clock driver for ROHM BD718x7 PMIC" depends on MFD_ROHM_BD718XX || MFD_ROHM_BD70528
drivers/clk/mmp/Makefile +1 -1
@@ -8,7 +8,7 @@ obj-y += clk-apbc.o clk-apmu.o clk-frac.o clk-mix.o clk-gate.o clk.o obj-$(CONFIG_RESET_CONTROLLER) += reset.o obj-$(CONFIG_MACH_MMP_DT) += clk-of-pxa168.o clk-of-pxa910.o -obj-$(CONFIG_MACH_MMP2_DT) += clk-of-mmp2.o +obj-$(CONFIG_COMMON_CLK_MMP2) += clk-of-mmp2.o obj-$(CONFIG_CPU_PXA168) += clk-pxa168.o obj-$(CONFIG_CPU_PXA910) += clk-pxa910.o
Signature · 1 line
2.21.0
Lubomir Rintel
reviewerPATCH v2 16/20 ARM: mmp: add SMP support
In reply to Lubomir RintelUsed to bring up the second core on MMP3.
---
Changes since v1:
- Wrap SW_BRANCH_VIRT_ADDR with __pa_symbol()
arch/arm/mach-mmp/Makefile | 3 +++ arch/arm/mach-mmp/platsmp.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 arch/arm/mach-mmp/platsmp.c
arch/arm/mach-mmp/Makefile +3 -0
@@ -22,6 +22,9 @@ ifeq ($(CONFIG_PM),y) obj-$(CONFIG_CPU_PXA910) += pm-pxa910.o obj-$(CONFIG_CPU_MMP2) += pm-mmp2.o endif +ifeq ($(CONFIG_SMP),y) +obj-$(CONFIG_MACH_MMP3_DT) += platsmp.o +endif # board support obj-$(CONFIG_MACH_ASPENITE) += aspenite.o
arch/arm/mach-mmp/platsmp.c new file +33 -0
@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2019 Lubomir Rintel <[email protected]> +*/ +#include <linux/io.h> +#include <asm/smp_scu.h> +#include <asm/smp.h> +#include "addr-map.h" + +#define SW_BRANCH_VIRT_ADDR CIU_REG(0x24) + +static int mmp3_boot_secondary (unsigned int cpu,struct task_struct *idle) +{ +/* +* Apparently, the boot ROM on the second core spins on this +* register becoming non-zero and then jumps to the address written +* there. No IPIs involved. +*/ +__raw_writel (virt_to_phys (secondary_startup), +__pa_symbol (SW_BRANCH_VIRT_ADDR )); +return 0 ; +} + +static void mmp3_smp_prepare_cpus (unsigned int max_cpus) +{ +scu_enable (SCU_VIRT_BASE ); +} + +static const struct smp_operations mmp3_smp_ops__initconst = { + .smp_prepare_cpus = mmp3_smp_prepare_cpus, + .smp_boot_secondary = mmp3_boot_secondary, +}; +CPU_METHOD_OF_DECLARE (mmp3_smp,"marvell,mmp3-smp" , &mmp3_smp_ops);
Signature · 1 line
2.21.0
Re: [PATCH v2 16/20] ARM: mmp: add SMP support
Quoted 43 lines · Lubomir Rintel
Used to bring up the second core on MMP3.
Signed-off-by Lubomir Rintel <[email protected]>---
Changes since v1:
- WrapSW_BRANCH_VIRT_ADDRwith__pa_symbol()arch/arm/mach-mmp/Makefile | 3 +++ arch/arm/mach-mmp/platsmp.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 arch/arm/mach-mmp/platsmp.carch/arm/mach-mmp/Makefile +3
-0@@ -22,6 +22,9 @@ ifeq ($(CONFIG_PM),y) obj-$(CONFIG_CPU_PXA910) += pm-pxa910.o obj-$(CONFIG_CPU_MMP2) += pm-mmp2.o endif +ifeq ($(CONFIG_SMP),y) +obj-$(CONFIG_MACH_MMP3_DT) += platsmp.o +endif # board support obj-$(CONFIG_MACH_ASPENITE) += aspenite.oarch/arm/mach-mmp/platsmp.c new file +10
-0@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2019 Lubomir Rintel <[email protected]> +*/ +#include <linux/io.h> +#include <asm/smp_scu.h> +#include <asm/smp.h> +#include "addr-map.h" + +#define SW_BRANCH_VIRT_ADDR CIU_REG(0x24)
arch/arm/mach-mmp/platsmp.c line 20
Quoted 10 lines
arch/arm/mach-mmp/platsmp.c new file +10
-0+ +static int mmp3_boot_secondary (unsigned int cpu,struct task_struct *idle) +{ +/* +* Apparently, the boot ROM on the second core spins on this +* register becoming non-zero and then jumps to the address written +* there. No IPIs involved. +*/ +__raw_writel (virt_to_phys (secondary_startup), +__pa_symbol (SW_BRANCH_VIRT_ADDR ));
That looks wrong, the __pa_symbol() is applicable to secondary_startup, while SW_BRANCH_VIRT_ADDR does not need that.
Quoted 14 lines
arch/arm/mach-mmp/platsmp.c new file +13
-0+return 0 ; +} + +static void mmp3_smp_prepare_cpus (unsigned int max_cpus) +{ +scu_enable (SCU_VIRT_BASE ); +} + +static const struct smp_operations mmp3_smp_ops__initconst = { + .smp_prepare_cpus = mmp3_smp_prepare_cpus, + .smp_boot_secondary = mmp3_boot_secondary, +}; +CPU_METHOD_OF_DECLARE (mmp3_smp,"marvell,mmp3-smp" , &mmp3_smp_ops);
Signature · 1 line
Florian
Lubomir Rintel
reviewerRe: [PATCH v2 16/20] ARM: mmp: add SMP support
Quoted 49 lines · Florian Fainelli
Quoted 48 lines · Lubomir Rintel
Used to bring up the second core on MMP3.
Signed-off-by Lubomir Rintel <[email protected]>---
Changes since v1:
- WrapSW_BRANCH_VIRT_ADDRwith__pa_symbol()arch/arm/mach-mmp/Makefile | 3 +++ arch/arm/mach-mmp/platsmp.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 arch/arm/mach-mmp/platsmp.carch/arm/mach-mmp/Makefile +3
-0@@ -22,6 +22,9 @@ ifeq ($(CONFIG_PM),y) obj-$(CONFIG_CPU_PXA910) += pm-pxa910.o obj-$(CONFIG_CPU_MMP2) += pm-mmp2.o endif +ifeq ($(CONFIG_SMP),y) +obj-$(CONFIG_MACH_MMP3_DT) += platsmp.o +endif # board support obj-$(CONFIG_MACH_ASPENITE) += aspenite.oarch/arm/mach-mmp/platsmp.c new file +15
-0@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2019 Lubomir Rintel <[email protected]> +*/ +#include <linux/io.h> +#include <asm/smp_scu.h> +#include <asm/smp.h> +#include "addr-map.h" + +#define SW_BRANCH_VIRT_ADDR CIU_REG(0x24) + +static int mmp3_boot_secondary (unsigned int cpu,struct task_struct *idle) +{ +/* +* Apparently, the boot ROM on the second core spins on this
Quoted 8 lines
arch/arm/mach-mmp/platsmp.c line 20
Quoted 5 lines
arch/arm/mach-mmp/platsmp.c new file +5
-0+* register becoming non-zero and then jumps to the address written +* there. No IPIs involved. +*/ +__raw_writel (virt_to_phys (secondary_startup), +__pa_symbol (SW_BRANCH_VIRT_ADDR ));That looks wrong, the
__pa_symbol()is applicable tosecondary_startup, whileSW_BRANCH_VIRT_ADDRdoes not need that.
Whoops, sorry for that. Will fix in the next patch version in a few days.
Thanks
Lubo
Lubomir Rintel
reviewerPATCH v2 17/20 ARM: mmp: move cputype.h to include/linux/soc/
In reply to Lubomir RintelLet's move cputype.h away from mach-mmp/ so that the drivers outside that directory are able to tell the precise silicon revision. The MMP3 USB OTG PHY driver needs this.
---
MAINTAINERS | 1 +
arch/arm/mach-mmp/common.c | 2 +-
arch/arm/mach-mmp/devices.c | 2 +-
arch/arm/mach-mmp/mmp2.c | 2 +-
arch/arm/mach-mmp/pm-mmp2.c | 2 +-
arch/arm/mach-mmp/pm-pxa910.c | 2 +-
arch/arm/mach-mmp/pxa168.c | 2 +-
arch/arm/mach-mmp/pxa910.c | 2 +-
arch/arm/mach-mmp/time.c | 2 +-
{arch/arm/mach-mmp => include/linux/soc/mmp}/cputype.h | 0
10 files changed, 9 insertions(+), 8 deletions(-)
rename {arch/arm/mach-mmp => include/linux/soc/mmp}/cputype.h (100%)MAINTAINERS +1 -0
@@ -10796,6 +10796,7 @@ L: [email protected] (moderated for non-subscribers) S: Odd Fixes F: arch/arm/boot/dts/mmp* F: arch/arm/mach-mmp/ +F: linux/soc/mmp/ MMU GATHER AND TLB INVALIDATION M: Will Deacon <[email protected]>
arch/arm/mach-mmp/common.c +1 -1
@@ -13,7 +13,7 @@#include <asm/mach/map.h> #include <asm/system_misc.h> #include "addr-map.h" -#include "cputype.h" +#include <linux/soc/mmp/cputype.h> #include "common.h"
arch/arm/mach-mmp/devices.c +1 -1
@@ -11,7 +11,7 @@#include <asm/irq.h> #include "irqs.h" #include "devices.h" -#include "cputype.h" +#include <linux/soc/mmp/cputype.h> #include "regs-usb.h" int __init pxa_register_device(struct pxa_device_desc *desc,
arch/arm/mach-mmp/mmp2.c +1 -1
@@ -20,7 +20,7 @@#include <asm/mach/time.h> #include "addr-map.h" #include "regs-apbc.h" -#include "cputype.h" +#include <linux/soc/mmp/cputype.h> #include "irqs.h" #include "mfp.h" #include "devices.h"
arch/arm/mach-mmp/pm-mmp2.c +1 -1
@@ -17,7 +17,7 @@#include <linux/interrupt.h> #include <asm/mach-types.h> -#include "cputype.h" +#include <linux/soc/mmp/cputype.h> #include "addr-map.h" #include "pm-mmp2.h" #include "regs-icu.h"
arch/arm/mach-mmp/pm-pxa910.c +1 -1
@@ -18,7 +18,7 @@#include <asm/mach-types.h> #include <asm/outercache.h> -#include "cputype.h" +#include <linux/soc/mmp/cputype.h> #include "addr-map.h" #include "pm-pxa910.h" #include "regs-icu.h"
arch/arm/mach-mmp/pxa168.c +1 -1
@@ -21,7 +21,7 @@#include "addr-map.h" #include "clock.h" #include "common.h" -#include "cputype.h" +#include <linux/soc/mmp/cputype.h> #include "devices.h" #include "irqs.h" #include "mfp.h"
arch/arm/mach-mmp/pxa910.c +1 -1
@@ -18,7 +18,7 @@#include <asm/mach/time.h> #include "addr-map.h" #include "regs-apbc.h" -#include "cputype.h" +#include <linux/soc/mmp/cputype.h> #include "irqs.h" #include "mfp.h" #include "devices.h"
arch/arm/mach-mmp/time.c +1 -1
@@ -33,7 +33,7 @@#include "regs-timers.h" #include "regs-apbc.h" #include "irqs.h" -#include "cputype.h" +#include <linux/soc/mmp/cputype.h> #include "clock.h" #define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE
include/linux/soc/mmp/cputype.h renamed from arch/arm/mach-mmp/cputype.h +0 -0
Signature · 1 line
2.21.0
Lubomir Rintel
reviewerPATCH v2 18/20 ARM: mmp: remove MMP3 USB PHY registers from regs-usb.h
In reply to Lubomir RintelNothing in mach-mmp/ uses them and they belong to the PHY driver.
--- arch/arm/mach-mmp/regs-usb.h | 94 ------------------------------------ 1 file changed, 94 deletions(-)
arch/arm/mach-mmp/regs-usb.h +0 -94
@@ -121,100 +121,6 @@#define UTMI_OTG_ADDON_OTG_ON (1 << 0) -/* For MMP3 USB Phy */ -#define USB2_PLL_REG0 0x4 -#define USB2_PLL_REG1 0x8 -#define USB2_TX_REG0 0x10 -#define USB2_TX_REG1 0x14 -#define USB2_TX_REG2 0x18 -#define USB2_RX_REG0 0x20 -#define USB2_RX_REG1 0x24 -#define USB2_RX_REG2 0x28 -#define USB2_ANA_REG0 0x30 -#define USB2_ANA_REG1 0x34 -#define USB2_ANA_REG2 0x38 -#define USB2_DIG_REG0 0x3C -#define USB2_DIG_REG1 0x40 -#define USB2_DIG_REG2 0x44 -#define USB2_DIG_REG3 0x48 -#define USB2_TEST_REG0 0x4C -#define USB2_TEST_REG1 0x50 -#define USB2_TEST_REG2 0x54 -#define USB2_CHARGER_REG0 0x58 -#define USB2_OTG_REG0 0x5C -#define USB2_PHY_MON0 0x60 -#define USB2_RESETVE_REG0 0x64 -#define USB2_ICID_REG0 0x78 -#define USB2_ICID_REG1 0x7C - -/* USB2_PLL_REG0 */ -/* This is for Ax stepping */ -#define USB2_PLL_FBDIV_SHIFT_MMP3 0 -#define USB2_PLL_FBDIV_MASK_MMP3 (0xFF << 0) - -#define USB2_PLL_REFDIV_SHIFT_MMP3 8 -#define USB2_PLL_REFDIV_MASK_MMP3 (0xF << 8) - -#define USB2_PLL_VDD12_SHIFT_MMP3 12 -#define USB2_PLL_VDD18_SHIFT_MMP3 14 - -/* This is for B0 stepping */ -#define USB2_PLL_FBDIV_SHIFT_MMP3_B0 0 -#define USB2_PLL_REFDIV_SHIFT_MMP3_B0 9 -#define USB2_PLL_VDD18_SHIFT_MMP3_B0 14 -#define USB2_PLL_FBDIV_MASK_MMP3_B0 0x01FF -#define USB2_PLL_REFDIV_MASK_MMP3_B0 0x3E00 - -#define USB2_PLL_CAL12_SHIFT_MMP3 0 -#define USB2_PLL_CALI12_MASK_MMP3 (0x3 << 0) - -#define USB2_PLL_VCOCAL_START_SHIFT_MMP3 2 - -#define USB2_PLL_KVCO_SHIFT_MMP3 4 -#define USB2_PLL_KVCO_MASK_MMP3 (0x7<<4) - -#define USB2_PLL_ICP_SHIFT_MMP3 8 -#define USB2_PLL_ICP_MASK_MMP3 (0x7<<8) - -#define USB2_PLL_LOCK_BYPASS_SHIFT_MMP3 12 - -#define USB2_PLL_PU_PLL_SHIFT_MMP3 13 -#define USB2_PLL_PU_PLL_MASK (0x1 << 13) - -#define USB2_PLL_READY_MASK_MMP3 (0x1 << 15) - -/* USB2_TX_REG0 */ -#define USB2_TX_IMPCAL_VTH_SHIFT_MMP3 8 -#define USB2_TX_IMPCAL_VTH_MASK_MMP3 (0x7 << 8) - -#define USB2_TX_RCAL_START_SHIFT_MMP3 13 - -/* USB2_TX_REG1 */ -#define USB2_TX_CK60_PHSEL_SHIFT_MMP3 0 -#define USB2_TX_CK60_PHSEL_MASK_MMP3 (0xf << 0) - -#define USB2_TX_AMP_SHIFT_MMP3 4 -#define USB2_TX_AMP_MASK_MMP3 (0x7 << 4) - -#define USB2_TX_VDD12_SHIFT_MMP3 8 -#define USB2_TX_VDD12_MASK_MMP3 (0x3 << 8) - -/* USB2_TX_REG2 */ -#define USB2_TX_DRV_SLEWRATE_SHIFT 10 - -/* USB2_RX_REG0 */ -#define USB2_RX_SQ_THRESH_SHIFT_MMP3 4 -#define USB2_RX_SQ_THRESH_MASK_MMP3 (0xf << 4) - -#define USB2_RX_SQ_LENGTH_SHIFT_MMP3 10 -#define USB2_RX_SQ_LENGTH_MASK_MMP3 (0x3 << 10) - -/* USB2_ANA_REG1*/ -#define USB2_ANA_PU_ANA_SHIFT_MMP3 14 - -/* USB2_OTG_REG0 */ -#define USB2_OTG_PU_OTG_SHIFT_MMP3 3 -/* fsic registers */ #define FSIC_MISC 0x4#define FSIC_INT 0x28
Signature · 1 line
2.21.0
Lubomir Rintel
reviewerPATCH v2 19/20 phy: phy-mmp3-usb: add a new driver
In reply to Lubomir RintelThis is the USB2 PHY as found on the Marvell MMP3 SoC. Based on Marvell GPL release.
While at that, also add a MAINTAINERS entry including the other MMP PHY driver.
--- MAINTAINERS | 7 + drivers/phy/marvell/Kconfig | 11 ++ drivers/phy/marvell/Makefile | 1 + drivers/phy/marvell/phy-mmp3-usb.c | 291 +++++++++++++++++++++++++++++ 4 files changed, 310 insertions(+) create mode 100644 drivers/phy/marvell/phy-mmp3-usb.c
MAINTAINERS +7 -0
@@ -10798,6 +10798,13 @@ F: arch/arm/boot/dts/mmp* F: arch/arm/mach-mmp/ F: linux/soc/mmp/ +MMP USB PHY DRIVERS +R: Lubomir Rintel <[email protected]> +L: [email protected] (moderated for non-subscribers) +S: Maintained +F: drivers/phy/marvell/phy-mmp3-usb.c +F: drivers/phy/marvell/phy-pxa-usb.c + MMU GATHER AND TLB INVALIDATION M: Will Deacon <[email protected]> M: "Aneesh Kumar K.V" <[email protected]>
drivers/phy/marvell/Kconfig +11 -0
@@ -102,3 +102,14 @@ config PHY_PXA_USB The PHY driver will be used by Marvell udc/ehci/otg driver. To compile this driver as a module, choose M here. + +config PHY_MMP3_USB + tristate "Marvell MMP3 USB PHY Driver" + depends on MACH_MMP3_DT || COMPILE_TEST + select GENERIC_PHY + help + Enable this to support Marvell MMP3 USB PHY driver for Marvell + SoC. This driver will do the PHY initialization and shutdown. + The PHY driver will be used by Marvell udc/ehci/otg driver. + + To compile this driver as a module, choose M here.
drivers/phy/marvell/Makefile +1 -0
@@ -2,6 +2,7 @@ obj-$(CONFIG_ARMADA375_USBCLUSTER_PHY) += phy-armada375-usb2.o obj-$(CONFIG_PHY_BERLIN_SATA) += phy-berlin-sata.o obj-$(CONFIG_PHY_BERLIN_USB) += phy-berlin-usb.o +obj-$(CONFIG_PHY_MMP3_USB) += phy-mmp3-usb.o obj-$(CONFIG_PHY_MVEBU_A3700_COMPHY) += phy-mvebu-a3700-comphy.o obj-$(CONFIG_PHY_MVEBU_A3700_UTMI) += phy-mvebu-a3700-utmi.o obj-$(CONFIG_PHY_MVEBU_A38X_COMPHY) += phy-armada38x-comphy.o
drivers/phy/marvell/phy-mmp3-usb.c new file +291 -0
291 lines not on this page · raw message
Signature · 1 line
2.21.0
Lubomir Rintel
reviewerPATCH v2 20/20 ARM: dts: mmp3: Add MMP3 SoC dts file
In reply to Lubomir RintelDescribes most of the hardware found on Marvell MMP3, aka PXA2128, aka Armada 620. Missing bits are the LCD controller, HSIC controllers, Audio and GPU. Will be completed once bindings and drivers settle.
--- arch/arm/boot/dts/mmp3.dtsi | 534 ++++++++++++++++++++++++++++++++++++ 1 file changed, 534 insertions(+) create mode 100644 arch/arm/boot/dts/mmp3.dtsi
arch/arm/boot/dts/mmp3.dtsi new file +534 -0
@@ -0,0 +1,534 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Copyright (C) 2019 Lubomir Rintel <[email protected]> + */ + +#include <dt-bindings/clock/marvell,mmp2.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> + +/ { + #address-cells = <1>; + #size-cells = <1>; + + aliases { + serial0 = &uart1; + serial1 = &uart2; + serial2 = &uart3; + serial3 = &uart4; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + enable-method = "marvell,mmp3-smp"; + + cpu@0 { + compatible = "marvell,pj4b"; + device_type = "cpu"; + next-level-cache = <&l2>; + reg = <0>; + }; + + cpu@1 { + compatible = "marvell,pj4b"; + device_type = "cpu"; + next-level-cache = <&l2>; + reg = <1>; + }; + }; + + soc { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + interrupt-parent = <&gic>; + ranges; + + axi@d4200000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0xd4200000 0x00200000>; + ranges; + + interrupt-controller@d4282000 { + compatible = "marvell,mmp3-intc"; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0xd4282000 0x1000>, + <0xd4284000 0x100>; + mrvl,intc-nr-irqs = <64>; + }; + + pmic_mux: interrupt-controller@d4282150 { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x150 0x4>, <0x168 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <4>; + }; + + rtc_mux: interrupt-controller@d4282154 { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x154 0x4>, <0x16c 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <2>; + }; + + hsi3_mux: interrupt-controller@d42821bc { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x1bc 0x4>, <0x1a4 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <3>; + }; + + gpu_mux: interrupt-controller@d42821c0 { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x1c0 0x4>, <0x1a8 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <3>; + }; + + twsi_mux: interrupt-controller@d4282158 { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x158 0x4>, <0x170 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <5>; + }; + + hsi2_mux: interrupt-controller@d42821c4 { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x1c4 0x4>, <0x1ac 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <2>; + }; + + dxo_mux: interrupt-controller@d42821c8 { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x1c8 0x4>, <0x1b0 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <2>; + }; + + misc1_mux: interrupt-controller@d428215c { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x15c 0x4>, <0x174 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <31>; + }; + + ci_mux: interrupt-controller@d42821cc { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x1cc 0x4>, <0x1b4 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <2>; + }; + + ssp_mux: interrupt-controller@d4282160 { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x160 0x4>, <0x178 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <2>; + }; + + hsi1_mux: interrupt-controller@d4282184 { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x184 0x4>, <0x17c 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <4>; + }; + + misc2_mux: interrupt-controller@d4282188 { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x188 0x4>, <0x180 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <20>; + }; + + hsi0_mux: interrupt-controller@d42821d0 { + compatible = "mrvl,mmp2-mux-intc"; + interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x1d0 0x4>, <0x1b8 0x4>; + reg-names = "mux status", "mux mask"; + mrvl,intc-nr-irqs = <5>; + }; + + usb_otg_phy0: usb-otg-phy@d4207000 { + compatible = "marvell,mmp3-usb-phy"; + reg = <0xd4207000 0x40>; + #phy-cells = <0>; + status = "disabled"; + }; + + usb_otg0: usb-otg@d4208000 { + compatible = "marvell,pxau2o-ehci"; + reg = <0xd4208000 0x200>; + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&soc_clocks MMP2_CLK_USB>; + clock-names = "USBCLK"; + phys = <&usb_otg_phy0>; + phy-names = "usb"; + status = "disabled"; + }; + + mmc1: mmc@d4280000 { + compatible = "mrvl,pxav3-mmc"; + reg = <0xd4280000 0x120>; + clocks = <&soc_clocks MMP2_CLK_SDH0>; + clock-names = "io"; + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + mmc2: mmc@d4280800 { + compatible = "mrvl,pxav3-mmc"; + reg = <0xd4280800 0x120>; + clocks = <&soc_clocks MMP2_CLK_SDH1>; + clock-names = "io"; + interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + mmc3: mmc@d4281000 { + compatible = "mrvl,pxav3-mmc"; + reg = <0xd4281000 0x120>; + clocks = <&soc_clocks MMP2_CLK_SDH2>; + clock-names = "io"; + interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + mmc4: mmc@d4281800 { + compatible = "mrvl,pxav3-mmc"; + reg = <0xd4281800 0x120>; + clocks = <&soc_clocks MMP2_CLK_SDH3>; + clock-names = "io"; + interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + camera0: camera@d420a000 { + compatible = "marvell,mmp2-ccic"; + reg = <0xd420a000 0x800>; + interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&soc_clocks MMP2_CLK_CCIC0>; + clock-names = "axi"; + #clock-cells = <0>; + clock-output-names = "mclk"; + status = "disabled"; + }; + + camera1: camera@d420a800 { + compatible = "marvell,mmp2-ccic"; + reg = <0xd420a800 0x800>; + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&soc_clocks MMP2_CLK_CCIC1>; + clock-names = "axi"; + #clock-cells = <0>; + clock-output-names = "mclk"; + status = "disabled"; + }; + }; + + apb@d4000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0xd4000000 0x00200000>; + ranges; + + timer: timer@d4014000 { + compatible = "mrvl,mmp-timer"; + reg = <0xd4014000 0x100>; + interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&soc_clocks MMP2_CLK_TIMER>; + }; + + uart1: uart@d4030000 { + compatible = "mrvl,mmp-uart"; + reg = <0xd4030000 0x1000>; + interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&soc_clocks MMP2_CLK_UART0>; + resets = <&soc_clocks MMP2_CLK_UART0>; + reg-shift = <2>; + status = "disabled"; + }; + + uart2: uart@d4017000 { + compatible = "mrvl,mmp-uart"; + reg = <0xd4017000 0x1000>; + interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&soc_clocks MMP2_CLK_UART1>; + resets = <&soc_clocks MMP2_CLK_UART1>; + reg-shift = <2>; + status = "disabled"; + }; + + uart3: uart@d4018000 { + compatible = "mrvl,mmp-uart"; + reg = <0xd4018000 0x1000>; + interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&soc_clocks MMP2_CLK_UART2>; + resets = <&soc_clocks MMP2_CLK_UART2>; + reg-shift = <2>; + status = "disabled"; + }; + + uart4: uart@d4016000 { + compatible = "mrvl,mmp-uart"; + reg = <0xd4016000 0x1000>; + interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&soc_clocks MMP2_CLK_UART3>; + resets = <&soc_clocks MMP2_CLK_UART3>; + reg-shift = <2>; + status = "disabled"; + }; + + gpio: gpio@d4019000 { + compatible = "marvell,mmp2-gpio"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0xd4019000 0x1000>; + gpio-controller; + #gpio-cells = <2>; + interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "gpio_mux"; + clocks = <&soc_clocks MMP2_CLK_GPIO>; + resets = <&soc_clocks MMP2_CLK_GPIO>; + interrupt-controller; + #interrupt-cells = <2>; + ranges; + + gcb0: gpio@d4019000 { + reg = <0xd4019000 0x4>; + }; + + gcb1: gpio@d4019004 { + reg = <0xd4019004 0x4>; + }; + + gcb2: gpio@d4019008 { + reg = <0xd4019008 0x4>; + }; + + gcb3: gpio@d4019100 { + reg = <0xd4019100 0x4>; + }; + + gcb4: gpio@d4019104 { + reg = <0xd4019104 0x4>; + }; + + gcb5: gpio@d4019108 { + reg = <0xd4019108 0x4>; + }; + }; + + twsi1: i2c@d4011000 { + compatible = "mrvl,mmp-twsi"; + reg = <0xd4011000 0x1000>; + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&soc_clocks MMP2_CLK_TWSI0>; + resets = <&soc_clocks MMP2_CLK_TWSI0>; + #address-cells = <1>; + #size-cells = <0>; + mrvl,i2c-fast-mode; + status = "disabled"; + }; + + twsi2: i2c@d4031000 { + compatible = "mrvl,mmp-twsi"; + reg = <0xd4031000 0x1000>; + interrupt-parent = <&twsi_mux>; + interrupts = <0>; + clocks = <&soc_clocks MMP2_CLK_TWSI1>; + resets = <&soc_clocks MMP2_CLK_TWSI1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + twsi3: i2c@d4032000 { + compatible = "mrvl,mmp-twsi"; + reg = <0xd4032000 0x1000>; + interrupt-parent = <&twsi_mux>; + interrupts = <1>; + clocks = <&soc_clocks MMP2_CLK_TWSI2>; + resets = <&soc_clocks MMP2_CLK_TWSI2>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + twsi4: i2c@d4033000 { + compatible = "mrvl,mmp-twsi"; + reg = <0xd4033000 0x1000>; + interrupt-parent = <&twsi_mux>; + interrupts = <2>; + clocks = <&soc_clocks MMP2_CLK_TWSI3>; + resets = <&soc_clocks MMP2_CLK_TWSI3>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + + twsi5: i2c@d4033800 { + compatible = "mrvl,mmp-twsi"; + reg = <0xd4033800 0x1000>; + interrupt-parent = <&twsi_mux>; + interrupts = <3>; + clocks = <&soc_clocks MMP2_CLK_TWSI4>; + resets = <&soc_clocks MMP2_CLK_TWSI4>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + twsi6: i2c@d4034000 { + compatible = "mrvl,mmp-twsi"; + reg = <0xd4034000 0x1000>; + interrupt-parent = <&twsi_mux>; + interrupts = <4>; + clocks = <&soc_clocks MMP2_CLK_TWSI5>; + resets = <&soc_clocks MMP2_CLK_TWSI5>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + rtc: rtc@d4010000 { + compatible = "mrvl,mmp-rtc"; + reg = <0xd4010000 0x1000>; + interrupts = <1 0>; + interrupt-names = "rtc 1Hz", "rtc alarm"; + interrupt-parent = <&rtc_mux>; + clocks = <&soc_clocks MMP2_CLK_RTC>; + resets = <&soc_clocks MMP2_CLK_RTC>; + status = "disabled"; + }; + + ssp1: spi@d4035000 { + compatible = "marvell,mmp2-ssp"; + reg = <0xd4035000 0x1000>; + clocks = <&soc_clocks MMP2_CLK_SSP0>; + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + ssp2: spi@d4036000 { + compatible = "marvell,mmp2-ssp"; + reg = <0xd4036000 0x1000>; + clocks = <&soc_clocks MMP2_CLK_SSP1>; + interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + ssp3: spi@d4037000 { + compatible = "marvell,mmp2-ssp"; + reg = <0xd4037000 0x1000>; + clocks = <&soc_clocks MMP2_CLK_SSP2>; + interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + ssp4: spi@d4039000 { + compatible = "marvell,mmp2-ssp"; + reg = <0xd4039000 0x1000>; + clocks = <&soc_clocks MMP2_CLK_SSP3>; + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + }; + + l2: l2-cache-controller@d0020000 { + compatible = "marvell,tauros3-cache", "arm,pl310-cache"; + reg = <0xd0020000 0x1000>; + cache-unified; + cache-level = <2>; + }; + + soc_clocks: clocks { + compatible = "marvell,mmp2-clock"; + reg = <0xd4050000 0x1000>, + <0xd4282800 0x400>, + <0xd4015000 0x1000>; + reg-names = "mpmu", "apmu", "apbc"; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; + + snoop-control-unit@e0000000 { + compatible = "arm,arm11mp-scu"; + reg = <0xe0000000 0x100>; + }; + + gic: interrupt-controller@e0001000 { + compatible = "arm,arm11mp-gic"; + interrupt-controller; + #interrupt-cells = <3>; + reg = <0xe0001000 0x1000>, + <0xe0000100 0x100>; + }; + + local-timer@e0000600 { + compatible = "arm,arm11mp-twd-timer"; + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | + IRQ_TYPE_EDGE_RISING)>; + reg = <0xe0000600 0x20>; + }; + + watchdog@2c000620 { + compatible = "arm,arm11mp-twd-wdt"; + reg = <0xe0000620 0x20>; + interrupts = <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | + IRQ_TYPE_EDGE_RISING)>; + }; + }; +};
Signature · 1 line
2.21.0
Quoted 9 lines · Lubomir Rintel
Hi,
this is a second spin of a patch set that adds support for the Marvell MMP3 processor. MMP3 is used in OLPC XO-4 laptops, Panasonic Toughpad FZ-A1 tablet and Dell Wyse 3020 Tx0D thin clients.
Compared to v1, there's a handful of fixes in response to reviews. Patch 02/20 is new. Details in individual patches.
Quoted 7 lines
Apart from the adjustments in mach-mmp/, the patch makes necessary changes to the irqchip driver and adds an USB2 PHY driver. The latter has a dependency on the mach-mmp/ changes, so it can't be submitted separately.
The patch set has been tested to work on Wyse Tx0D and not ruin MMP2 support on XO-1.75.
How do you want this series to be merged? I'm happy to take the irqchip related patches as well as the corresponding DT change (once reviewed) through my tree.
Thanks,
M.
Signature · 1 line
Jazz is not dead, it just smells funny...
Quoted 16 lines · Marc Zyngier
Quoted 14 lines · Lubomir Rintel
Hi,
this is a second spin of a patch set that adds support for the Marvell MMP3 processor. MMP3 is used in OLPC XO-4 laptops, Panasonic Toughpad FZ-A1 tablet and Dell Wyse 3020 Tx0D thin clients.
Compared to v1, there's a handful of fixes in response to reviews. Patch 02/20 is new. Details in individual patches.
Apart from the adjustments in mach-mmp/, the patch makes necessary changes to the irqchip driver and adds an USB2 PHY driver. The latter has a dependency on the mach-mmp/ changes, so it can't be submitted separately.
Quoted 6 lines
Quoted 2 lines
The patch set has been tested to work on Wyse Tx0D and not ruin MMP2 support on XO-1.75.
How do you want this series to be merged? I'm happy to take the irqchip related patches as well as the corresponding DT change (once reviewed) through my tree.
DT changes, unless there's lack of backwards compatibility, are best merged through the platform trees. Especially for new platforms like these where there's likely going to be nearby changes (and thus conflicts).
I.e. driver changes I'm all for bringing through driver trees (including binding patches), but please leave dts/dtsi changes to the platform.
-Olof
Lubomir Rintel
reviewerQuoted 15 lines · Marc Zyngier
Quoted 14 lines · Lubomir Rintel
Hi,
this is a second spin of a patch set that adds support for the Marvell MMP3 processor. MMP3 is used in OLPC XO-4 laptops, Panasonic Toughpad FZ-A1 tablet and Dell Wyse 3020 Tx0D thin clients.
Compared to v1, there's a handful of fixes in response to reviews. Patch 02/20 is new. Details in individual patches.
Apart from the adjustments in mach-mmp/, the patch makes necessary changes to the irqchip driver and adds an USB2 PHY driver. The latter has a dependency on the mach-mmp/ changes, so it can't be submitted separately.
Quoted 6 lines
Quoted 2 lines
The patch set has been tested to work on Wyse Tx0D and not ruin MMP2 support on XO-1.75.
How do you want this series to be merged? I'm happy to take the irqchip related patches as well as the corresponding DT change (once reviewed) through my tree.
I was hoping for the Arm SoC tree, because there are some dependencies (MMP3 USB PHY depends on MMP3 SoC).
That said, the irqchip patches are rather independent and the only downside of them going in via a different tree will be that the other tree that will lack them won't boot on MMP3 (things will compile though). I don't know if that's okay. What's typically done in cases like these?
Quoted 3 lines
Thanks,
M.
Thank you
Lubo
Marc Zyngier
Acked-byQuoted 23 lines · Lubomir Rintel
Quoted 15 lines · Marc Zyngier
Quoted 14 lines · Lubomir Rintel
Hi,
this is a second spin of a patch set that adds support for the Marvell MMP3 processor. MMP3 is used in OLPC XO-4 laptops, Panasonic Toughpad FZ-A1 tablet and Dell Wyse 3020 Tx0D thin clients.
Compared to v1, there's a handful of fixes in response to reviews. Patch 02/20 is new. Details in individual patches.
Apart from the adjustments in mach-mmp/, the patch makes necessary changes to the irqchip driver and adds an USB2 PHY driver. The latter has a dependency on the mach-mmp/ changes, so it can't be submitted separately.
Quoted 6 lines
Quoted 2 lines
The patch set has been tested to work on Wyse Tx0D and not ruin MMP2 support on XO-1.75.
How do you want this series to be merged? I'm happy to take the irqchip related patches as well as the corresponding DT change (once reviewed) through my tree.
Quoted 8 lines
I was hoping for the Arm SoC tree, because there are some dependencies (MMP3 USB PHY depends on MMP3 SoC).
That said, the irqchip patches are rather independent and the only downside of them going in via a different tree will be that the other tree that will lack them won't boot on MMP3 (things will compile though). I don't know if that's okay. What's typically done in cases like these?
I usually take the irqchip patches that can be built standalone (without dependency on header files, for example). If you want them to go via another tree, stick my
on patches #6 through #9.
Thanks,
M.
Signature · 1 line
Jazz is not dead, it just smells funny...
Lubomir Rintel
reviewerQuoted 33 lines · Marc Zyngier
Quoted 23 lines · Lubomir Rintel
Quoted 15 lines · Marc Zyngier
Quoted 14 lines · Lubomir Rintel
Hi,
this is a second spin of a patch set that adds support for the Marvell MMP3 processor. MMP3 is used in OLPC XO-4 laptops, Panasonic Toughpad FZ-A1 tablet and Dell Wyse 3020 Tx0D thin clients.
Compared to v1, there's a handful of fixes in response to reviews. Patch 02/20 is new. Details in individual patches.
Apart from the adjustments in mach-mmp/, the patch makes necessary changes to the irqchip driver and adds an USB2 PHY driver. The latter has a dependency on the mach-mmp/ changes, so it can't be submitted separately.
Quoted 6 lines
Quoted 2 lines
The patch set has been tested to work on Wyse Tx0D and not ruin MMP2 support on XO-1.75.
How do you want this series to be merged? I'm happy to take the irqchip related patches as well as the corresponding DT change (once reviewed) through my tree.
Quoted 8 lines
I was hoping for the Arm SoC tree, because there are some dependencies (MMP3 USB PHY depends on MMP3 SoC).
That said, the irqchip patches are rather independent and the only downside of them going in via a different tree will be that the other tree that will lack them won't boot on MMP3 (things will compile though). I don't know if that's okay. What's typically done in cases like these?
Quoted 7 lines
I usually take the irqchip patches that can be built standalone (without dependency on header files, for example). If you want them to go via another tree, stick my
Acked-by Marc Zyngier <[email protected]>on patches #6 through #9.
Actually, please go ahead and pick the irqchip patches into your tree.
The rest of the patch set may need a couple more spins, and it will be nice if it gets shorter.
Thank you
Lubo
Marc Zyngier
AppliedQuoted 38 lines · Lubomir Rintel
Quoted 37 lines · Marc Zyngier
Quoted 23 lines · Lubomir Rintel
Quoted 15 lines · Marc Zyngier
Quoted 14 lines · Lubomir Rintel
Hi,
this is a second spin of a patch set that adds support for the Marvell MMP3 processor. MMP3 is used in OLPC XO-4 laptops, Panasonic Toughpad FZ-A1 tablet and Dell Wyse 3020 Tx0D thin clients.
Compared to v1, there's a handful of fixes in response to reviews. Patch 02/20 is new. Details in individual patches.
Apart from the adjustments in mach-mmp/, the patch makes necessary changes to the irqchip driver and adds an USB2 PHY driver. The latter has a dependency on the mach-mmp/ changes, so it can't be submitted separately.
Quoted 6 lines
Quoted 2 lines
The patch set has been tested to work on Wyse Tx0D and not ruin MMP2 support on XO-1.75.
How do you want this series to be merged? I'm happy to take the irqchip related patches as well as the corresponding DT change (once reviewed) through my tree.
Quoted 8 lines
I was hoping for the Arm SoC tree, because there are some dependencies (MMP3 USB PHY depends on MMP3 SoC).
That said, the irqchip patches are rather independent and the only downside of them going in via a different tree will be that the other tree that will lack them won't boot on MMP3 (things will compile though). I don't know if that's okay. What's typically done in cases like these?
I usually take the irqchip patches that can be built standalone (without dependency on header files, for example). If you want them to go via another tree, stick my
Quoted 8 lines
Quoted 3 lines
Acked-by Marc Zyngier <[email protected]>on patches #6 through #9.
Actually, please go ahead and pick the irqchip patches into your tree.
The rest of the patch set may need a couple more spins, and it will be nice if it gets shorter.
Applied to irqchip-next.
M.
Signature · 1 line
Jazz is not dead, it just smells funny...