aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/mt7621-dts (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-06-09staging: mt7621-dts: move some properties into root port child nodesSergio Paracuellos1-9/+12
After a review of the bindings 'clocks', 'resets' and 'phys' must be moved into root port child nodes. Hence, move all of them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-5-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: mt7621-dts: review pcie overlay in 'gbpc1' dts fileSergio Paracuellos1-6/+0
pcie node is being overlayed in 'gbpc1.dts' file requesting three gpio reset pins for each pcie port. Gnubee only needs general gpio 19 to properly reset and make all of them work. This pin is already requested in the general 'mt7621.dtsi' file as well as is the pinctrl pins. So we only need to enable the node in the overlay and all the other stuff can be safely deleted. Also, pin 8 is being requested for gpio-leds node and there was an error on boot before this changes because of pin was already assigned (EBUSY): leds-gpio: probe of gpio-leds failed with error -16 With this changes this error has disappear and the board is properly booting without any other regression. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210604063031.13599-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-14staging: mt7621-dts: use clock in pci phy nodesSergio Paracuellos1-0/+2
MT7621 SoC clock driver has already mainlined in 'commit 48df7a26f470 ("clk: ralink: add clock driver for mt7621 SoC")' Hence we can use the clock in pcie phy nodes to be able to get it from there in driver code. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210514112820.32499-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: mt7621-dts: add missing device_type in pcie root portsSergio Paracuellos1-0/+3
According to the YAML schema 'pci-bus.yaml' the 'device_type' property is mandatory for all pcie root ports. Hence add it. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210506170742.28196-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: mt7621-dts: remove 'bug-range' propertySergio Paracuellos1-4/+0
Property 'bus-range' when values are the default are not necessary to be defined. Hence, remove all of them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210506170742.28196-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: mt7621-dts: use standard 'syscon' stringSergio Paracuellos1-2/+2
Both 'memc' and 'sysc' nodes are not using 'syscon' as a node string which is the standard one to be used. Update both of them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210505132154.8263-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: mt7621-dts: remove ethsys nodeSergio Paracuellos1-8/+1
DT 'ethsys' node is being configured as a syscon to get access to reset and other registers in the 'mediateķ,mt7621-eth' driver. Since the 'sysc' is also a syscon, provides the clock and also is virtually mapped from the same physical address 0x1e000000 we can just use 'sysc' as the phandle for the syscon in the ethernet node. Compatible string 'mediatek,mt7621-ethsys' of the node is not being used anywhere inside the kernel so, this node can be safely removed. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210505132154.8263-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: mt7621-dts: properly organize pcie nodeSergio Paracuellos1-9/+7
Device tree pcie node for this SoC is using different styles in its different properties. Hence properly unify them to be able to write a a proper yaml schema documentation. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210505121736.6459-11-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: mt7621-dts: use 'interrupt-map' and 'interrupt-map-mask'Sergio Paracuellos1-4/+14
Custom function for 'map_irq' was introduced in commit fab6710e4c51 ("staging: mt7621-pci: fix PCIe interrupt mapping") This is not really necessary and code has been fixed to avoid custom configuration of the virtual bridges and make possible to properly map the root ports interrupts using this standard properties. Hence properly update device tree accordly. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210505121736.6459-10-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12staging: mt7621-dts: use valid vendor 'mediatek' instead of invalid 'mtk'Sergio Paracuellos1-6/+6
Vendor listed for mediatek in kernel vendor file 'vendor-prefixes.yaml' contains 'mediatek' as a valid vendor string. Some nodes in the device tree are using an invalid vendor string vfor 'mtk' instead. Fix all of them in dts file. Update also ralink mt7621 related code to properly match new strings. Even there are used in the device tree there are some strings that are not referred anywhere but have been also updated with new vendor name. These are 'mtk,mt7621-wdt', 'mtk,mt7621-nand', 'mtk,mt7621-mc', and 'mtk,mt7621-cpc'. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210410055059.13518-4-sergio.paracuellos@gmail.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2021-04-12staging: mt7621-dts: make use of new 'mt7621-clk'Sergio Paracuellos2-52/+33
Clocks for SoC mt7621 have been properly integrated so there is no need to declare fixed clocks at all in the device tree. Remove all of them, add new device tree nodes for mt7621-clk and update the rest of the nodes to use them. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210410055059.13518-3-sergio.paracuellos@gmail.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2021-01-26staging: mt7621-dts: remove obsolete switch nodeDENG Qingfang1-7/+0
This was for OpenWrt's swconfig driver, which never made it upstream, and was also superseded by MT7530 DSA driver. Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: DENG Qingfang <dqfext@gmail.com> Link: https://lore.kernel.org/r/20210108025155.31556-1-dqfext@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-05staging: mt7621-dts: match pinctrl nodes with its binding documentationSergio Paracuellos1-28/+23
According to the binding documentation pinctrl related nodes must use '-pins$' and ''^(.*-)?pinmux$'' as names. Change all to properly match them. Also default state is for consumer nodes and shall be removed from here. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210104150651.32083-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-07staging: mt7621-pinctrl: stop using the deprecated 'pinctrl_add_gpio_range'Sergio Paracuellos1-0/+1
If the gpio DT node has the 'gpio-ranges' property, the range will be added by the gpio core and doesn't need to be added by the pinctrl driver. By having the gpio-ranges property, we can map every pin between gpio node and pinctrl node and we can stop using the deprecated pinctrl_add_gpio_range() function. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20201206105333.18428-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: mt7621-pci: fix PCIe interrupt mappingSergio Paracuellos1-5/+4
MT7621 has three assigned interrupts for the pcie. This interrupts should properly being mapped taking into account which devices are finally connected in which bus according to link status. So the irq mappings should be as follows according to link status (three bits indicating which devices are link up): * For PCIe Bus 1 slot 0: - status = 0x2 || status = 0x6 => IRQ = pcie1_irq (24). - status = 0x4 => IRQ = pcie2_irq (25). - default => IRQ = pcie0_irq (23). * For PCIe Bus 2 slot 0: - status = 0x5 || status = 0x6 => IRQ = pcie2_irq (25). - default => IRQ = pcie1_irq (24). * For PCIe Bus 2 slot 1: - status = 0x5 || status = 0x6 => IRQ = pcie2_irq (25). - default => IRQ = pcie1_irq (24). * For PCIe Bus 3 any slot: - default => IRQ = pcie2_irq (25). Because of this, the function 'of_irq_parse_and_map_pci' cannot be used and we need to change device tree information from using the 'interrupt-map' and 'interrupt-map-mask' properties into an 'interrupts' property to be able to get irq information from the ports using the 'platform_get_irq' and storing an 'irq-map' into the pcie driver data node to properly map correct irq using a new 'mt7621_map_irq' function where this map will be read and the correct irq returned. Fixes: 46d093124df4 ("staging: mt7621-pci: improve interrupt mapping") Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20200413055942.2714-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-21staging: mt7621-dts: gpio 8 and 9 are vendor specificSergio Paracuellos2-3/+5
There are three pins that can be used for reset gpios. As mentioned in the application note, there are two possible way of wiring pcie reset: * connect gpio19 to all pcie reset pins * connect gpio19 to pcie0 reset and pick two other gpios for pcie1 and pcie2 gpio7 and gpio8 may not be used as pcie reset and are vendor specific. Hence, maintain common mt7621.dtsi with only gpio19 which is common and make an overlay for gnubee board which uses all gpio's as resets for pcie. After this changes release gpios in driver code is not needed anymore. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20200321072650.7784-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-20staging: mt7621-dts: set up only two pcie physSergio Paracuellos1-3/+3
This soc has only two real pcie phys one of them having a different register to enable and disable it. Change this to have only two dt nodes for the phys and use 'phy-cells' properly to say if the phy has dual ports. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20200320110123.9907-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-17staging: mt7621-dts: make use of 'reset-gpios' property for pciSergio Paracuellos1-4/+7
Properly set pins for group pcie as 'gpio' function and declare gpio's in the pci node to make reset stuff properly functional. Delete no more needed general reset and previous pers gpio which is now being used in 'reset-gpios' property. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20200313200913.24321-4-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-10staging: mt7621-dts: fix register range of memc node in mt7621.dtsiChuanhong Guo1-1/+1
The memc node from mt7621.dtsi has incorrect register resource. Fix it according to the programming guide. Signed-off-by: Weijie Gao <hackpascal@gmail.com> Signed-off-by: Chuanhong Guo <gch981213@gmail.com> Link: https://lore.kernel.org/r/20200109080120.362110-1-gch981213@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03staging: mt7621-dts: add support for second network interfaceNeilBrown5-6/+37
The mt7621 has two network interfaces, one that connects to an internal switch, and one that can connect to either that switch or an external phy, or possibly an internal phy. The Gnubee-PC2 has an external phy for use with the second interface. This patch add some support for the second interface to mt7621.dtsi and add a gbpc2.dts which makes use of this. This allows the second interface to be used. I don't fully understand how to configure this interface - the documentation is thin - so there could well be room for improvement here. Signed-off-by: NeilBrown <neil@brown.name> Link: https://lore.kernel.org/r/156194178766.1430.12784163026696670896.stgit@noble.brown Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03staging: mt7621-dts: update sdhci config.NeilBrown1-1/+40
The mtk-sd driver has been updated to support the IP in the mt7621, so update our configuration to work with it. Signed-off-by: NeilBrown <neil@brown.name> Link: https://lore.kernel.org/r/156194178761.1430.1625105851941268306.stgit@noble.brown Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20staging: mt7621-dts: add gpio perst to pcie bindings nodeSergio Paracuellos1-0/+2
Driver has been changed to use perts gpio reset instead of perst builtin behaviour. Update device tree accordly. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18staging: Add missing newline at end of fileGeert Uytterhoeven1-1/+1
"git diff" says: \ No newline at end of file after modifying the files. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Makefile filesGreg Kroah-Hartman1-0/+1
There are a few remaining drivers/staging/*/Makefile files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Kconfig filesGreg Kroah-Hartman1-0/+1
There are a few remaining drivers/staging/*/Kconfig files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-29staging: mt7621-dts: simplify pcie phy bindingsSergio Paracuellos1-20/+3
If each phy port doesn't have its own resources, then we don't need child nodes. Handle it using #phy-cells to 1 for both phy's. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: mt7621-dts: update ethernet settings.NeilBrown2-19/+83
The ethernet in mt7621 is now supported by drivers/net/ethernet/mediatek/ which provides support for the integrated switch through DSA. This requires some devicetree changes, and particularly allows a board dts to identify which switch ports are present. The second CPU interface - gmac1 - doesn't work yet, so the device tree information may not be correct. The phy (which is present on the gnubee-pc2) can negotiate and report connection speed etc, but no traffic flows. The gnubee-pc1 has two network ports which are 'black' and 'blue'. There are connected to switch ports 0 and 4 respectively. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-dts: add general pcie reset line to pcie bindingsSergio Paracuellos1-2/+2
Add general pci reset line to pcie bindings to use reset_control properly in driver code. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-dts: fix pci phy register addressesSergio Paracuellos1-4/+4
Both pci-phy0 and pci-phy1 are using bad addresses to search for its registers. Use proper register values. Fixes: 06184ba5a33a: staging: mt7621-dts: add pci-phy related bindings to board's device tree Reported-by: NeilBrown <neil@brown.name> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-07staging: mt7621-dts: add pci-phy related bindings to board's device treeSergio Paracuellos1-0/+31
New driver for pci phy has been added, as well as. pci driver has been changed to use kernel's generic PHY API. Add related PCI PHY bindings accordly. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-07staging: mt7621-dts: use standard 'groups' instead of 'group' for pinctrl bindingsSergio Paracuellos2-14/+14
Pinctrl generic functions looks for standard property 'groups' in DT to get data and use in the driver. Change all of them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: mt7621-dts: avoid warnings in pinctrl definitionsNeilBrown1-11/+11
The device-tree checking code sees node names "i2c" and "spi" in the pinctrl definition and thinks these are defining i2c or spi devices, and complains that they look wrong. So add a '0' to the end of each name (much like "uart" and "rgmii" have numbers at the end) to avoid the warning. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: mt7621-dts: allow gnubee to reboot cleanly.NeilBrown1-0/+1
Since commit bb276262e88d ("mtd: spi-nor: only apply reset hacks to broken hardware"), we need to mark the spi-nor as "broken" for reboot to work. Note that nothing is actually broken here. The hardware-watchdog in the SoC isn't wired in a way that works, but then the board doesn't claim to support a hardware watchdog - and the SPI certain isn't "broken". This causes an annoying warning on every boot, but that is better than failing on ever reboot. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-26staging: mt7621-dts: remove sysctl registers from pcie bindingsSergio Paracuellos1-2/+1
The sysctl register are already claimed by palmbus, so pci fails to claim it. Remove registers accordly from DT bindings. Fixes: 624c5227ed0a: staging: mt7621-dts: add sysctl registers base address to pcie Reported-by: NeilBrown <neil@brown.name> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Tested-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-dts: add sysctl registers base address to pcieSergio Paracuellos1-2/+2
Add missing system control registers address in pcie node of the device tree. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: mt7621-dts: add pcie controller port registersSergio Paracuellos1-2/+4
The pcie node of the device tree only contains registers for the host-bridge and pcie port 0. Add the pcie port 1 and pcie port 2 also. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Tested-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-dts: use 'function' and 'group' for pinctrl bindingsSergio Paracuellos1-24/+24
According to documentation 'pinctrl-bindings.txt' bindings 'group' and 'function' can be used directly. So replace all of them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: mt7621-gpio: avoid use banks in device treeSergio Paracuellos2-32/+9
Banks shouldn't be defined in DT if number of resources per bank is not variable. We actually know that this SoC has three banks so take that into account in order to don't overspecify the device tree. Device tree will only have one node making it simple. Update device tree, binding doc and code accordly. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: mt7621-dts: Fix remaining pcie warningsRosen Penev2-12/+11
This currently fixes the remaining dtb warnings: Node /pcie@1e140000/pcie0 has a reg or ranges property, but no unit name Node /pcie@1e140000/pcie1 has a reg or ranges property, but no unit name Node /pcie@1e140000/pcie2 has a reg or ranges property, but no unit name Node /pcie@1e140000/pcie0 node name is not "pci" or "pcie" Node /pcie@1e140000/pcie0 missing ranges for PCI bridge (or not a bridge) Node /pcie@1e140000/pcie0 missing bus-range for PCI bridge Node /pcie@1e140000/pcie1 node name is not "pci" or "pcie" Node /pcie@1e140000/pcie1 missing ranges for PCI bridge (or not a bridge) Node /pcie@1e140000/pcie1 missing bus-range for PCI bridge Node /pcie@1e140000/pcie2 node name is not "pci" or "pcie" Node /pcie@1e140000/pcie2 missing ranges for PCI bridge (or not a bridge) Node /pcie@1e140000/pcie2 missing bus-range for PCI bridge Warning (unit_address_format): Failed prerequisite 'pci_bridge' Warning (pci_device_reg): Failed prerequisite 'pci_bridge' Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' device_type was removed since according to documentation, it's deprecated for pci(e) devices. Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-17staging: mt7621-dts: convert to gpio-keysNeilBrown1-5/+2
Now that gpio-interrupts work correctly, we can use gpio-keys instead of gpio-keys-polled for the single push-button on the gbpc-1. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-17staging: mt7621-dts: correct various clock frequencies.NeilBrown2-4/+5
The MT7621 documentation says that the sys clock - also known as OCP clock for the Open Core Protocol - can be configured to 1/3 or 1/4 of the CPU clock. Testing on my hardware, using the fact that the SPI clock is based on the OCP clock and measuring transfer rates, shows a clock of a little over 200MHz with a CPU clock of 900MHz. So assume 1/4 is the default. Also, the nor-flash in the gbpc1 is documented as accepting 50MHz for request requests, and higher for other requests. So set maximum to 50MHz. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-01staging: mt7621-gpio: update #interrupt-cells for the gpio nodeSergio Paracuellos1-2/+2
Most gpio chips have two cells for interrupts and this should be also. Set this property in the device tree accordly fixing this up. In order to make this working properly the xlate function for the irq_domain must be updated to use the 'irq_domain_xlate_twocell' one in the driver. One more minimal change is needed two refer gpio's interrupt-parent from other nodes which is to add new 'gpio' label in the device tree. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-01staging: mt7621-dts: add missing properties to gpio nodeSergio Paracuellos1-0/+2
In order to let other devices reference the GPIO interrupts if necessary properties 'interrupt-controller' and '#interrupt-cells' becomes necessary. Add both of them to complete gpio device tree node. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-25staging: mt7621-dts: add interrupt device tree nodes for the gpio controllerSergio Paracuellos1-0/+3
The GPIO controller of mt7621 can receive interrupts on any of the GPIOs, either edge or level. It then interrupts the CPU using GIC INT12. Update device tree accordly. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-25staging: mt7621-dts: update gpios related entries to use 'mediatek'Sergio Paracuellos1-4/+4
Gpio driver for mt7621 is using 'mtk' as binding but in the kernel is already defined one for this maker which is 'mediatek'. Update device tree to use the correct one. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: mt7621-dts: update nor-flash info for gnubee1NeilBrown1-2/+1
The GNUBEE has 32MB flash, so set partitions accordingly. Also remove "m25p,chunked-io" which isn't documented or used anywhere (outside of freewrt). Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: mt7621-pci: improve interrupt mappingNeilBrown1-4/+5
As the Interrupts for the PCI adapters are listed in devicetree we shouldn't need to have them explicit in the code. The simplest way to do this is to use of_irq_parse_and_map_pci() and specify an interrupt-map which identifies the different PCI hosts by bus/slot numbers. This has the advantage that the hwirq number are mapped to virq numbers for us, so the ugly hack can go. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-29staging: mt7621-dts: Replace spaces with tabs in indentationNishka Dasgupta1-1/+1
Replace spaces with tabs in indentation. Issue found with checkpatch. Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-19staging: mt7621-dts: add dts filesNeilBrown5-0/+627
Add device tree source for mt7621 and gnubee1 to make testing easier. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>