dd NPCM7xx patches to dev-4.19
Subsystems (10)
Tomer Maimon
maintainercover dd NPCM7xx patches to dev-4.19
Hi Joel,
Please add the following NPCM7xx patches to dev-4.19:
1. NPCM FIU driver(SPI-NOR).
2. NPCM7xx I2C driver.
3. NPCM7xx BIOS post code driver.
4. NPCM7xx PCI mailbox driver.
5. NPCM7xx ETHERNET MAC Controller driver.
6. NPCM7xx defconfig.
7. NPCM7xx Device tree.
8. NPCM ADC driver.
The patch sets NPCM drivers tested on NPCM750 evaluation board.
Tomer Maimon (15):
clk: nuvoton: add npcm750 clock function prototype initialization
dt-binding: mtd: add NPCM FIU controller
mtd: spi-nor: add NPCM FIU controller driver
dt-bindings: i2c: npcm7xx: add binding for i2c controller
i2c: npcm: driver for Poleg i2c controller
dt-binding: bmc: Add NPCM7xx LPC BPC documentation
misc: npcm7xx-lpc-bpc: add NPCM7xx BIOS post code driver
dt-binding: bmc: add npcm7xx pci mailbox document
misc: mbox: add npcm7xx pci mailbox driver
dt-binding: net: document NPCM7xx EMC DT bindings
net: npcm: add NPCM7xx Ethernet MAC controller
dt-binding: iio: add NPCM ADC documentation
iio: adc: add NPCM ADC driver
arm: npcm: add defconfig for Nuvoton NPCM7xx BMC
dts: npcm7xx: Modify NPCM7xx device tree
.../devicetree/bindings/bmc/npcm7xx-lpc-bpc.txt | 26 + .../devicetree/bindings/bmc/npcm7xx-pci-mbox.txt | 19 + .../devicetree/bindings/i2c/i2c-npcm7xx.txt | 29 + .../bindings/iio/adc/nuvoton,npcm-adc.txt | 35 + Documentation/devicetree/bindings/mtd/npcm-fiu.txt | 64 + .../bindings/net/nuvoton,npcm7xx-emc.txt | 36 + arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 199 +- arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 165 +- arch/arm/boot/dts/nuvoton-npcm750-gpio.dtsi | 18 +- arch/arm/boot/dts/nuvoton-npcm750.dtsi | 10 +- arch/arm/configs/npcm7xx_defconfig | 122 ++ drivers/i2c/busses/Kconfig | 11 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-npcm7xx.c | 2017 +++++++++++++++++++ drivers/iio/adc/Kconfig | 10 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/npcm_adc.c | 336 ++++ drivers/misc/Kconfig | 15 + drivers/misc/Makefile | 2 + drivers/misc/npcm7xx-lpc-bpc.c | 394 ++++ drivers/misc/npcm7xx-pci-mbox.c | 288 +++ drivers/mtd/spi-nor/Kconfig | 8 + drivers/mtd/spi-nor/Makefile | 1 + drivers/mtd/spi-nor/npcm-fiu.c | 930 +++++++++ drivers/net/ethernet/nuvoton/Kconfig | 17 +- drivers/net/ethernet/nuvoton/Makefile | 2 + drivers/net/ethernet/nuvoton/npcm7xx_emc.c | 2091 ++++++++++++++++++++ include/linux/clk/nuvoton.h | 9 + 28 files changed, 6712 insertions(+), 144 deletions(-) create mode 100644 Documentation/devicetree/bindings/bmc/npcm7xx-lpc-bpc.txt create mode 100644 Documentation/devicetree/bindings/bmc/npcm7xx-pci-mbox.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-npcm7xx.txt create mode 100644 Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt create mode 100644 Documentation/devicetree/bindings/mtd/npcm-fiu.txt create mode 100644 Documentation/devicetree/bindings/net/nuvoton,npcm7xx-emc.txt create mode 100644 arch/arm/configs/npcm7xx_defconfig create mode 100644 drivers/i2c/busses/i2c-npcm7xx.c create mode 100644 drivers/iio/adc/npcm_adc.c create mode 100644 drivers/misc/npcm7xx-lpc-bpc.c create mode 100644 drivers/misc/npcm7xx-pci-mbox.c create mode 100644 drivers/mtd/spi-nor/npcm-fiu.c create mode 100644 drivers/net/ethernet/nuvoton/npcm7xx_emc.c create mode 100644 include/linux/clk/nuvoton.h
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 1/15 clk: nuvoton: add npcm750 clock function prototype initialization
--- include/linux/clk/nuvoton.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 include/linux/clk/nuvoton.h
include/linux/clk/nuvoton.h new file +9 -0
@@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (c) 2014-2019 Nuvoton Technology corporation. */ + +#ifndef __LINUX_CLK_NUVOTON_H_ +#define __LINUX_CLK_NUVOTON_H_ + +void nuvoton_npcm750_clock_init (void ); + +#endif
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 2/15 dt-binding: mtd: add NPCM FIU controller
In reply to Tomer MaimonAdded device tree binding documentation for Nuvoton BMC NPCM Flash Interface Unit(FIU) SPI-NOR controller.
--- Documentation/devicetree/bindings/mtd/npcm-fiu.txt | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/npcm-fiu.txt
Documentation/devicetree/bindings/mtd/npcm-fiu.txt new file +64 -0
@@ -0,0 +1,64 @@ +* Nuvoton FLASH Interface Unit (FIU) SPI Controller + +NPCM FIU supports single, dual and quad communication interface. + +The NPCM7XX supports three FIU modules, +FIU0 and FIUx supports two chip selects, +FIU3 support four chip select. + +Required properties: + - compatible : "nuvoton,npcm750-fiu" for the NPCM7XX BMC + - #address-cells : should be 1. + - #size-cells : should be 0. + - reg : the first contains the register location and length, + the second contains the memory mapping address and length + - reg-names: Should contain the reg names "control" and "memory" + - clocks : phandle of F reference clock. + +Required properties in case the pins can be muxed: + - pinctrl-names : a pinctrl state named "default" must be defined. + - pinctrl-0 : phandle referencing pin configuration of the device. + +Optional property: + - spix-mode: enable spix-mode for an expansion bus to an ASIC or CPLD. + +The SPI device must be a child of the FIU node and must have a +compatible property as specified in bindings/mtd/jedec,spi-nor.txt + +Required property: +- reg: chip select number. + +Optional property: +- spi-rx-bus-width: see ../spi/spi-bus.txt for the description. + +Aliases: +- All the FIU controller nodes should be represented in the aliases node using + the following format 'fiu{n}' where n is a unique number for the alias. + In the NPCM7XX BMC: + fiu0 represent fiu 0 controller + fiu1 represent fiu 3 controller + fiu2 represent fiu x controller + +Example: +fiu3: fiu@c00000000 { + compatible = "nuvoton,npcm750-fiu"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0xfb000000 0x1000>, <0x80000000 0x10000000>; + reg-names = "control", "memory"; + clocks = <&clk NPCM7XX_CLK_AHB>; + pinctrl-names = "default"; + pinctrl-0 = <&spi3_pins>; + spi-nor@0 { + compatible = "jedec,spi-nor"; + spi-rx-bus-width = <2>; + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + partition@0 { + label = "flash_data"; + reg = <0x0 0x800000>; + }; + }; +}; +
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 3/15 mtd: spi-nor: add NPCM FIU controller driver
In reply to Tomer MaimonAdd Nuvoton NPCM BMC Flash Interface Unit(FIU) SPI-NOR controller driver
The FIU supports single, dual or quad communication interface.
the FIU controller can operate in following modes:
- User Mode Access(UMA): provides flash access by using an indirect address/data mechanism.
- direct rd/wr mode: maps the flash memory into the core address space.
- SPI-X mode: used for an expansion bus to an ASIC or CPLD.
--- drivers/mtd/spi-nor/Kconfig | 8 + drivers/mtd/spi-nor/Makefile | 1 + drivers/mtd/spi-nor/npcm-fiu.c | 930 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 939 insertions(+) create mode 100644 drivers/mtd/spi-nor/npcm-fiu.c
drivers/mtd/spi-nor/Kconfig +8 -0
@@ -75,6 +75,14 @@ config SPI_HISI_SFC help This enables support for hisilicon SPI-NOR flash controller. +config SPI_NPCM_FIU + tristate "NPCM FLASH Interface unit(FIU) controller " + depends on ARCH_NPCM || COMPILE_TEST + help + This enables support for the FLASH Interface unit(FIU) controller. + This driver does not support generic SPI. The implementation only + supports SPI NOR. + config SPI_NXP_SPIFI tristate "NXP SPI Flash Interface (SPIFI)" depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
drivers/mtd/spi-nor/Makefile +1 -0
@@ -6,6 +6,7 @@ obj-$(CONFIG_SPI_CADENCE_QUADSPI) += cadence-quadspi.o obj-$(CONFIG_SPI_FSL_QUADSPI) += fsl-quadspi.o obj-$(CONFIG_SPI_HISI_SFC) += hisi-sfc.o obj-$(CONFIG_MTD_MT81xx_NOR) += mtk-quadspi.o +obj-$(CONFIG_SPI_NPCM_FIU) += npcm-fiu.o obj-$(CONFIG_SPI_NXP_SPIFI) += nxp-spifi.o obj-$(CONFIG_SPI_INTEL_SPI) += intel-spi.o obj-$(CONFIG_SPI_INTEL_SPI_PCI) += intel-spi-pci.o
drivers/mtd/spi-nor/npcm-fiu.c new file +930 -0
930 lines not on this page · raw message
Signature · 1 line
2.14.1
Re: [linux dev-4.19 03/15] mtd: spi-nor: add NPCM FIU controller driver
Hi Tomer,
Quoted 17 lines · Tomer Maimon
Add Nuvoton NPCM BMC Flash Interface Unit(FIU) SPI-NOR controller driver
The FIU supports single, dual or quad communication interface.
the FIU controller can operate in following modes:
- User Mode Access(UMA): provides flash access by using an indirect address/data mechanism.
- direct rd/wr mode: maps the flash memory into the core address space.
- SPI-X mode: used for an expansion bus to an ASIC or CPLD.drivers/mtd/spi-nor/npcm-fiu.c new file +3
-0+static int npcm_fiu_uma_read (struct spi_nor *nor,u8 transaction_code, +u32 address,bool is_address_size,u8 *data, +u32 data_size)
drivers/mtd/spi-nor/npcm-fiu.c line 302
Quoted 10 lines
drivers/mtd/spi-nor/npcm-fiu.c new file +9
-0+{ + +regmap_update_bits (host->regmap,NPCM_FIU_UMA_CTS , +NPCM_FIU_UMA_CTS_DEV_NUM , + (chip->chipselect << +NPCM_FIU_UMA_CTS_DEV_NUM_SHIFT )); +regmap_update_bits (host->regmap,NPCM_FIU_UMA_CMD , +NPCM_FIU_UMA_CMD_CMD , transaction_code); +regmap_write (host->regmap,NPCM_FIU_UMA_ADDR , address);
I notice this driver uses regmap for register reads and writes. Are you aware that regmap has a very large overhead for every operation? It takes a few hundred instructions to do each read/write, where as readl/writel result in one or two instructions.
I'd strongly recommend implementing your drivers without regmap unless you are using it to access, for example, a couple of registers that are shared between drivers.
Cheers,
Joel
Tomer Maimon
maintainerPATCH 4/15 dt-bindings: i2c: npcm7xx: add binding for i2c controller
In reply to Tomer Maimon--- .../devicetree/bindings/i2c/i2c-npcm7xx.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-npcm7xx.txt
Documentation/devicetree/bindings/i2c/i2c-npcm7xx.txt new file +29 -0
@@ -0,0 +1,29 @@ +Nuvoton NPCM7XX I2C bus + +The NPCM750x includes sixteen I2C bus controllers. All Controllers support +both master and slave mode. Each controller has two 16 byte HW FIFO for TX and +RX. + +Required properties: +- compatible : must be "nuvoton,npcm750-i2c" +- reg : Offset and length of the register set for the device. +- interrupts : Contain the I2C interrupt with flags for falling edge. +- clocks : phandle of I2C reference clock. + +Optional: +- bus-frequency : Contain the I2C bus frequency, + the default I2C bus frequency is 100000. +- pinctrl-0 : must be <&smbX_pins>, X is module number + (on NPCM7XX it's 0 to 15) +- pinctrl-names : should be set to "default" +Example: + + i2c0: i2c@80000 { + compatible = "nuvoton,npcm750-i2c"; + reg = <0x80000 0x1000>; + clocks = <&clk NPCM7XX_CLK_APB2>; + bus-frequency = <100000>; + interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&smb0_pins>; + };
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 5/15 i2c: npcm: driver for Poleg i2c controller
In reply to Tomer Maimon--- drivers/i2c/busses/Kconfig | 11 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-npcm7xx.c | 2017 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 2029 insertions(+) create mode 100644 drivers/i2c/busses/i2c-npcm7xx.c
drivers/i2c/busses/Kconfig +11 -0
@@ -739,6 +739,17 @@ config I2C_NOMADIK I2C interface from ST-Ericsson's Nomadik and Ux500 architectures, as well as the STA2X11 PCIe I/O HUB. +config I2C_NPCM7XX + tristate "Nuvoton I2C Controller" + depends on ARCH_NPCM7XX + select I2C_SLAVE + help + If you say yes to this option, support will be included for the + Nuvoton I2C controller. + + This driver can also be built as a module. If so, the module + will be called i2c-npcm7xx. + config I2C_OCORES tristate "OpenCores I2C Controller" help
drivers/i2c/busses/Makefile +1 -0
@@ -74,6 +74,7 @@ obj-$(CONFIG_I2C_MT65XX) += i2c-mt65xx.o obj-$(CONFIG_I2C_MV64XXX) += i2c-mv64xxx.o obj-$(CONFIG_I2C_MXS) += i2c-mxs.o obj-$(CONFIG_I2C_NOMADIK) += i2c-nomadik.o +obj-$(CONFIG_I2C_NPCM7XX) += i2c-npcm7xx.o obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o obj-$(CONFIG_I2C_OMAP) += i2c-omap.o obj-$(CONFIG_I2C_OWL) += i2c-owl.o
drivers/i2c/busses/i2c-npcm7xx.c new file +2017 -0
2,017 lines not on this page · raw message
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 6/15 dt-binding: bmc: Add NPCM7xx LPC BPC documentation
In reply to Tomer MaimonAdded device tree binding documentation for Nuvoton BMC NPCM7xx BIOS Post Code (BPC).
The NPCM7xx BPC monitoring two configurable I/O addresses written by the host on Low Pin Count (LPC) bus.
--- .../devicetree/bindings/bmc/npcm7xx-lpc-bpc.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/bmc/npcm7xx-lpc-bpc.txt
Documentation/devicetree/bindings/bmc/npcm7xx-lpc-bpc.txt new file +26 -0
@@ -0,0 +1,26 @@ +Nuvoton NPCM7xx LPC BPC interface + +Nuvoton BMC NPCM7xx BIOS Post Code (BPC) monitoring two +configurable I/O addresses written by the host on the +Low Pin Count (LPC) bus, the capure data stored in 128-word FIFO. + +NPCM7xx BPC supports capture double words, when using capture +double word only I/O address 1 is monitored. + +Required properties for lpc_bpc node +- compatible : "nuvoton,npcm750-lpc-bpc" for Poleg NPCM7XX. +- reg : specifies physical base address and size of the registers. +- interrupts : contain the LPC BPC with flags for falling edge. +- monitor-ports : contain monitor I/O addresses, at least one monitor I/O + address required + +Optional property for lpc_bpc node +- bpc-en-dwcapture : enable capture double words support. + +Example: + lpc_bpc: lpc-bpc@f0007040 { + compatible = "nuvoton,npcm7xx-lpc-bpc"; + reg = <0xf0007040 0x14>; + monitor-ports = <0x80>; + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; + };
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 7/15 misc: npcm7xx-lpc-bpc: add NPCM7xx BIOS post code driver
In reply to Tomer MaimonAdd NPCM7xx BIOS post code (BPC) driver,
the BPC monitoring two I/O address written
by the host on the LPC.
--- drivers/misc/Kconfig | 8 + drivers/misc/Makefile | 1 + drivers/misc/npcm7xx-lpc-bpc.c | 394 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 403 insertions(+) create mode 100644 drivers/misc/npcm7xx-lpc-bpc.c
drivers/misc/Kconfig +8 -0
@@ -520,6 +520,14 @@ config MISC_RTSX tristate default MISC_RTSX_PCI || MISC_RTSX_USB +config NPCM7XX_LPC_BPC + tristate "NPCM7xx LPC BIOS Post Code support" + depends on (ARCH_NPCM7XX || COMPILE_TEST) + help + Provides a NPCM7xx driver to control the LPC BIOS Post Code + interface which allows the BMC to monitoring and save + the data written by the host to an arbitrary LPC I/O port. + source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +1 -0
@@ -59,3 +59,4 @@ obj-$(CONFIG_ASPEED_LPC_MBOX) += aspeed-lpc-mbox.o obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o obj-$(CONFIG_OCXL) += ocxl/ obj-$(CONFIG_MISC_RTSX) += cardreader/ +obj-$(CONFIG_NPCM7XX_LPC_BPC) += npcm7xx-lpc-bpc.o
drivers/misc/npcm7xx-lpc-bpc.c new file +394 -0
394 lines not on this page · raw message
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 8/15 dt-binding: bmc: add npcm7xx pci mailbox document
In reply to Tomer MaimonAdded device tree binding documentation for Nuvoton BMC NPCM7XX PCI mailbox.
--- .../devicetree/bindings/bmc/npcm7xx-pci-mbox.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/bmc/npcm7xx-pci-mbox.txt
Documentation/devicetree/bindings/bmc/npcm7xx-pci-mbox.txt new file +19 -0
@@ -0,0 +1,19 @@ +Nuvoton NPCM7xx PCI mail box interface + +Nuvoton BMC NPCM7xx PCI mail box, The mailbox is a high-bandwidth +communication module between the BMC CPU and host CPU. + +Required properties for lpc_bpc node +- compatible : "nuvoton,npcm750-pci-mbox" for Poleg NPCM7XX. +- reg : specifies two address space + 1. physical base address and size of the registers. + 2. physical base address and size of the dual-ported RAM. +- interrupts : contain the PCI mail box interrupt with flags for falling edge. + +Example: + pcimbox: pcimbox@f0848000 { + compatible = "nuvoton,npcm750-pci-mbox", "simple-mfd", "syscon"; + reg = <0xf084C000 0x8 + 0xf0848000 0x3F00>; + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; + };
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 9/15 misc: mbox: add npcm7xx pci mailbox driver
In reply to Tomer MaimonAdd Nuvoton BMC NPCM7XX PCI Mailbox driver.
--- drivers/misc/Kconfig | 7 + drivers/misc/Makefile | 1 + drivers/misc/npcm7xx-pci-mbox.c | 288 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 296 insertions(+) create mode 100644 drivers/misc/npcm7xx-pci-mbox.c
drivers/misc/Kconfig +7 -0
@@ -528,6 +528,13 @@ config NPCM7XX_LPC_BPC interface which allows the BMC to monitoring and save the data written by the host to an arbitrary LPC I/O port. +config NPCM7XX_PCI_MBOX + tristate "NPCM7xx PCI Mailbox Controller" + depends on (ARCH_NPCM7XX || COMPILE_TEST) && REGMAP && MFD_SYSCON + help + Expose the NPCM750/730/715/705 PCI MBOX registers found on + Nuvoton SOCs to userspace. + source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +1 -0
@@ -60,3 +60,4 @@ obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o obj-$(CONFIG_OCXL) += ocxl/ obj-$(CONFIG_MISC_RTSX) += cardreader/ obj-$(CONFIG_NPCM7XX_LPC_BPC) += npcm7xx-lpc-bpc.o +obj-$(CONFIG_NPCM7XX_PCI_MBOX) += npcm7xx-pci-mbox.o
drivers/misc/npcm7xx-pci-mbox.c new file +288 -0
288 lines not on this page · raw message
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 10/15 dt-binding: net: document NPCM7xx EMC DT bindings
In reply to Tomer MaimonAdded device tree binding documentation for
Nuvoton NPCM7xx Ethernet MAC Controller (EMC).
--- .../bindings/net/nuvoton,npcm7xx-emc.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/nuvoton,npcm7xx-emc.txt
Documentation/devicetree/bindings/net/nuvoton,npcm7xx-emc.txt new file +36 -0
@@ -0,0 +1,36 @@ +Nuvoton NPCM7XX 10/100 Ethernet MAC Controller (EMC) + +The NPCM750x provides two identical Ethernet MAC Controllers +for WAN/LAN applications + +Required properties: +- device_type : Should be "network" +- compatible : "nuvoton,npcm750-emc" for Poleg NPCM750. +- reg : Offset and length of the register set for the device. +- interrupts : Contain the emc interrupts with flags for falling edge. + first interrupt dedicated to Txirq + second interrupt dedicated to Rxirq +- phy-mode : Should be "rmii" (see ethernet.txt in the same directory) +- clocks : phandle of emc reference clock. +- use-ncsi : Use the NC-SI stack instead of an MDIO PHY + +Example: + +emc0: eth@f0825000 { + device_type = "network"; + compatible = "nuvoton,npcm750-emc"; + reg = <0xf0825000 0x1000>; + interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; + phy-mode = "rmii"; + clocks = <&clk NPCM7XX_CLK_AHB>; + + #use-ncsi; /* add this to support ncsi */ + + clock-names = "clk_emc"; + pinctrl-names = "default"; + pinctrl-0 = <&r1_pins + &r1err_pins + &r1md_pins>; + status = "okay"; +};
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 11/15 net: npcm: add NPCM7xx Ethernet MAC controller
In reply to Tomer MaimonAdd Nuvoton BMC NPCM7xx Ethernet MAC controller (EMC) driver.
--- drivers/net/ethernet/nuvoton/Kconfig | 17 +- drivers/net/ethernet/nuvoton/Makefile | 2 + drivers/net/ethernet/nuvoton/npcm7xx_emc.c | 2091 ++++++++++++++++++++++++++++ 3 files changed, 2109 insertions(+), 1 deletion(-) create mode 100644 drivers/net/ethernet/nuvoton/npcm7xx_emc.c
drivers/net/ethernet/nuvoton/Kconfig +16 -1
@@ -5,7 +5,7 @@ config NET_VENDOR_NUVOTON bool "Nuvoton devices" default y - depends on ARM && ARCH_W90X900 + depends on ARM && (ARCH_W90X900 || ARCH_NPCM7XX) ---help--- If you have a network (Ethernet) card belonging to this class, say Y.
@@ -25,4 +25,19 @@ config W90P910_ETH Say Y here if you want to use built-in Ethernet ports on w90p910 processor. +config NPCM7XX_EMC_ETH + bool "Nuvoton NPCM7XX Ethernet EMC" + depends on ARM && ARCH_NPCM7XX + select PHYLIB + select MII + help + Say Y here if you want to use built-in Ethernet MAC + on NPCM750 MCU. + +config NPCM7XX_EMC_ETH_DEBUG + bool "Nuvoton NPCM7XX Ethernet EMC debug" + depends on NPCM7XX_EMC_ETH + help + Say Y here if you want debug info via /proc/driver/npcm7xx_emc.x + endif # NET_VENDOR_NUVOTON
drivers/net/ethernet/nuvoton/Makefile +2 -0
@@ -2,4 +2,6 @@ # Makefile for the Nuvoton network device drivers. # +#Eternet 10/100 EMC obj-$(CONFIG_W90P910_ETH) += w90p910_ether.o +obj-$(CONFIG_NPCM7XX_EMC_ETH) += npcm7xx_emc.o
drivers/net/ethernet/nuvoton/npcm7xx_emc.c new file +2091 -0
2,091 lines not on this page · raw message
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 12/15 dt-binding: iio: add NPCM ADC documentation
In reply to Tomer MaimonAdded device tree binding documentation for Nuvoton BMC NPCM Analog-to-Digital Converter(ADC).
--- .../bindings/iio/adc/nuvoton,npcm-adc.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt
Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt new file +35 -0
@@ -0,0 +1,35 @@ +Nuvoton NPCM Analog to Digital Converter (ADC) + +The NPCM ADC is a 10-bit converter for eight channel inputs. + +Required properties: +- compatible : "nuvoton,npcm750-adc" for the NPCM7XX BMC. +- reg : specifies physical base address and size of the registers. +- interrupts : Contain the ADC interrupt with flags for falling edge. + +Optional properties: +- clocks : phandle of ADC reference clock, in case the clock is not + added the ADC will use the default ADC sample rate. +- vref-supply : The regulator supply ADC reference voltage, in case the + vref-supply is not added the ADC will use internal voltage + reference. + +Required Node in the NPCM7xx BMC: +An additional register is present in the NPCM7xx SOC which is +assumed to be in the same device tree, with and marked as +compatible with "nuvoton,npcm750-rst". + +Example: + +adc: adc@f000c000 { + compatible = "nuvoton,npcm750-adc"; + reg = <0xf000c000 0x8>; + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk NPCM7XX_CLK_ADC>; +}; + +rst: rst@f0801000 { + compatible = "nuvoton,npcm750-rst", "syscon", + "simple-mfd"; + reg = <0xf0801000 0x6C>; +};
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 13/15 iio: adc: add NPCM ADC driver
In reply to Tomer MaimonAdd Nuvoton NPCM BMC Analog-to-Digital Converter(ADC) driver.
The NPCM ADC is a 10-bit converter for eight channel inputs.
--- drivers/iio/adc/Kconfig | 10 ++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/npcm_adc.c | 336 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 347 insertions(+) create mode 100644 drivers/iio/adc/npcm_adc.c
drivers/iio/adc/Kconfig +10 -0
@@ -545,6 +545,16 @@ config NAU7802 To compile this driver as a module, choose M here: the module will be called nau7802. +config NPCM_ADC + tristate "Nuvoton NPCM ADC driver" + depends on ARCH_NPCM || COMPILE_TEST + depends on HAS_IOMEM + help + Say yes here to build support for Nuvoton NPCM ADC. + + This driver can also be built as a module. If so, the module + will be called npcm_adc. + config PALMAS_GPADC tristate "TI Palmas General Purpose ADC" depends on MFD_PALMAS
drivers/iio/adc/Makefile +1 -0
@@ -52,6 +52,7 @@ obj-$(CONFIG_MEN_Z188_ADC) += men_z188_adc.o obj-$(CONFIG_MESON_SARADC) += meson_saradc.o obj-$(CONFIG_MXS_LRADC_ADC) += mxs-lradc-adc.o obj-$(CONFIG_NAU7802) += nau7802.o +obj-$(CONFIG_NPCM_ADC) += npcm_adc.o obj-$(CONFIG_PALMAS_GPADC) += palmas_gpadc.o obj-$(CONFIG_QCOM_SPMI_IADC) += qcom-spmi-iadc.o obj-$(CONFIG_QCOM_VADC_COMMON) += qcom-vadc-common.o
drivers/iio/adc/npcm_adc.c new file +336 -0
336 lines not on this page · raw message
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 14/15 arm: npcm: add defconfig for Nuvoton NPCM7xx BMC
In reply to Tomer MaimonAdd configuration definition for Nuvoton
NPCM7xx (Poleg) BMC.
--- arch/arm/configs/npcm7xx_defconfig | 122 +++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 arch/arm/configs/npcm7xx_defconfig
arch/arm/configs/npcm7xx_defconfig new file +122 -0
@@ -0,0 +1,122 @@ +CONFIG_KERNEL_XZ=y +CONFIG_SYSVIPC=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_LOG_BUF_SHIFT=21 +CONFIG_CGROUPS=y +CONFIG_SYSFS_DEPRECATED=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_EMBEDDED=y +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_DEFAULT_DEADLINE=y +CONFIG_ARCH_NPCM=y +CONFIG_ARCH_NPCM7XX=y +CONFIG_SMP=y +CONFIG_VMSPLIT_3G_OPT=y +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_BINFMT_MISC=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_MTD=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_RAM=y +CONFIG_MTD_COMPLEX_MAPPINGS=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_SPI_NOR=y +CONFIG_SPI_NPCM_FIU=y +CONFIG_OF_OVERLAY=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NBD=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_NPCM7XX_LPC_BPC=y +CONFIG_NPCM7XX_PCI_MBOX=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_NETDEVICES=y +CONFIG_NPCM7XX_EMC_ETH=y +CONFIG_STMMAC_ETH=y +CONFIG_BROADCOM_PHY=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_NPCM750_OTP=y +CONFIG_NPCM750_OTP_WRITE_ENABLE=y +CONFIG_NPCM7XX_KCS_IPMI_BMC=y +CONFIG_HW_RANDOM=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_NPCM7XX=y +CONFIG_I2C_SLAVE_EEPROM=y +CONFIG_SPI=y +CONFIG_SPI_NPCM_PSPI=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_SENSORS_LM75=y +CONFIG_SENSORS_NPCM7XX=y +CONFIG_SENSORS_TMP102=y +CONFIG_WATCHDOG=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_NPCM750_VCD=y +CONFIG_NPCM750_ECE=y +CONFIG_USB_HIDDEV=y +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_NPCMX50_USB2=y +CONFIG_USB_CONFIGFS=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_EDM_KBD_MOUSE=m +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_NPCM750=y +CONFIG_IIO=y +CONFIG_NPCM_ADC=y +CONFIG_IIO_MUX=y +CONFIG_MUX_MMIO=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_ROMFS_FS=y +CONFIG_NFS_FS=y +CONFIG_ROOT_NFS=y +CONFIG_CIFS=y +CONFIG_CIFS_XATTR=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_REDUCED=y +CONFIG_READABLE_ASM=y +CONFIG_DEBUG_SECTION_MISMATCH=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_FUNCTION_TRACER=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_USER_API_SKCIPHER=y +CONFIG_CRYPTO_DEV_NPCMX50=y +CONFIG_ARM_CRYPTO=y
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 15/15 dts: npcm7xx: Modify NPCM7xx device tree
In reply to Tomer MaimonModify NPCM7xx device tree FIU, ADC, RST, VCD and SPI nodes Add regulator and HGPIO pins nodes.
--- arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 199 +++++++++++++++----------- arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 165 +++++++++++++++------ arch/arm/boot/dts/nuvoton-npcm750-gpio.dtsi | 18 +-- arch/arm/boot/dts/nuvoton-npcm750.dtsi | 10 +- 4 files changed, 249 insertions(+), 143 deletions(-)
arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi +119 -80
@@ -5,6 +5,7 @@ #include "skeleton.dtsi" #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/clock/nuvoton,npcm7xx-clock.h> +#include <dt-bindings/gpio/gpio.h> / { #address-cells = <1>;
@@ -74,7 +75,7 @@ rst: rst@f0801000 { compatible = "nuvoton,npcm750-rst", "syscon", "simple-mfd"; - reg = <0x801000 0x1000>; + reg = <0x801000 0x6C>; }; scu: scu@3fe000 {
@@ -128,7 +129,7 @@ clock-names = "stmmaceth", "clk_gmac"; pinctrl-names = "default"; pinctrl-0 = <&rg1_pins - &rg1mdio_pins>; + &rg1mdio_pins>; status = "disabled"; };
@@ -142,8 +143,9 @@ clock-names = "clk_emc"; pinctrl-names = "default"; pinctrl-0 = <&r1_pins - &r1err_pins - &r1md_pins>; + &r1err_pins + &r1md_pins>; + status = "disabled"; }; ehci1:usb@f0806000 {
@@ -213,52 +215,38 @@ interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; }; - spi0: spi@fb000000 { - compatible = "nuvoton,npcm750-spi"; + fiu0: fiu@fb000000 { + compatible = "nuvoton,npcm750-fiu"; #address-cells = <1>; #size-cells = <0>; reg = <0xfb000000 0x1000>, <0x80000000 0x10000000>; reg-names = "control", "memory"; - chip-max-address-map = <0x8000000>; clocks = <&clk NPCM7XX_CLK_AHB>; clock-names = "clk_ahb"; - spi-nor@0 { - compatible = "jedec,spi-nor"; - #address-cells = <1>; - #size-cells = <1>; - reg = <0>; - }; + status = "disabled"; }; - spi3: spi@c0000000 { - compatible = "nuvoton,npcm750-spi"; + + fiu3: fiu@c0000000 { + compatible = "nuvoton,npcm750-fiu"; #address-cells = <1>; #size-cells = <0>; reg = <0xc0000000 0x1000>, <0xA0000000 0x20000000>; reg-names = "control", "memory"; - chip-max-address-map = <0x8000000>; clocks = <&clk NPCM7XX_CLK_AHB>; clock-names = "clk_ahb"; pinctrl-names = "default"; - pinctrl-0 = <&spi3_pins &spi3quad_pins>; - spi-nor@0 { - compatible = "jedec,spi-nor"; - #address-cells = <1>; - #size-cells = <1>; - reg = <0>; - }; + pinctrl-0 = <&spi3_pins>; + status = "disabled"; }; - pci_rc: axi-pcie@e1000000 { - #address-cells = <3>; - #size-cells = <2>; - #interrupt-cells = <1>; - compatible = "nuvoton,npcm750-pcirc"; - reg = <0xe1000000 0x1000>; - device_type = "pci"; - interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>; - bus-range = <0x00 0xff>; - ranges = <0x02000000 0 0xea000000 - 0xea000000 0 0x02000000>; + fiux: fiu@fb001000 { + compatible = "nuvoton,npcm750-fiu"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0xfb001000 0x1000>, <0xf8000000 0x2000000>; + reg-names = "control", "memory"; + clocks = <&clk NPCM7XX_CLK_AHB>; + clock-names = "clk_ahb"; status = "disabled"; };
@@ -271,17 +259,18 @@ vcd: vcd@f0810000 { compatible = "nuvoton,npcm750-vcd"; reg = <0xf0810000 0x10000>; - phy-memory = <0x3e200000 0x600000>; - de-mode = /bits/ 8 <1>; - interrupts = <0 22 4>; + mem-addr = <0x3e200000>; + mem-size = <0x600000>; + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; }; ece: ece@f0820000 { compatible = "nuvoton,npcm750-ece"; reg = <0xf0820000 0x2000>; - phy-memory = <0x3e800000 0x600000>; - interrupts = <0 24 4>; + mem-addr = <0x3e800000>; + mem-size = <0x600000>; + interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; };
@@ -352,13 +341,30 @@ }; }; - pspi: pspi@0 { + spi0: spi@200000 { compatible = "nuvoton,npcm750-pspi"; - reg = <0x200000 0x2000>; - interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; + reg = <0x200000 0x1000>; + pinctrl-names = "default"; + pinctrl-0 = <&pspi1_pins>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk NPCM7XX_CLK_APB5>; clock-names = "clk_apb5"; + status = "disabled"; + }; + + spi1: spi@201000 { + compatible = "nuvoton,npcm750-pspi"; + reg = <0x201000 0x1000>; + pinctrl-names = "default"; + pinctrl-0 = <&pspi2_pins>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk NPCM7XX_CLK_APB5>; + clock-names = "clk_apb5"; + status = "disabled"; }; timer0: timer@8000 {
@@ -438,10 +444,10 @@ adc: adc@c000 { compatible = "nuvoton,npcm750-adc"; - reg = <0xc000 0x1000>; + reg = <0xc000 0x8>; + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk NPCM7XX_CLK_ADC>; - clock-names = "clk_adc"; - vref = <2048>; + status = "disabled"; }; otp:otp@189000 {
@@ -453,7 +459,7 @@ clock-names = "clk_apb4"; }; - pwm_fan:pwm-fan-controller@103000 { + pwm_fan:pwm-fan-controller@103000 { #address-cells = <1>; #size-cells = <0>; compatible = "nuvoton,npcm750-pwm-fan";
@@ -487,9 +493,9 @@ status = "disabled"; }; - i2c0: i2c-bus@80000 { + i2c0: i2c@80000 { reg = <0x80000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
@@ -498,9 +504,9 @@ status = "disabled"; }; - i2c1: i2c-bus@81000 { + i2c1: i2c@81000 { reg = <0x81000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
@@ -509,9 +515,9 @@ status = "disabled"; }; - i2c2: i2c-bus@82000 { + i2c2: i2c@82000 { reg = <0x82000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
@@ -520,9 +526,9 @@ status = "disabled"; }; - i2c3: i2c-bus@83000 { + i2c3: i2c@83000 { reg = <0x83000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
@@ -531,9 +537,9 @@ status = "disabled"; }; - i2c4: i2c-bus@84000 { + i2c4: i2c@84000 { reg = <0x84000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
@@ -542,9 +548,9 @@ status = "disabled"; }; - i2c5: i2c-bus@85000 { + i2c5: i2c@85000 { reg = <0x85000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
@@ -553,9 +559,9 @@ status = "disabled"; }; - i2c6: i2c-bus@86000 { + i2c6: i2c@86000 { reg = <0x86000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
@@ -564,9 +570,9 @@ status = "disabled"; }; - i2c7: i2c-bus@87000 { + i2c7: i2c@87000 { reg = <0x87000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
@@ -575,9 +581,9 @@ status = "disabled"; }; - i2c8: i2c-bus@88000 { + i2c8: i2c@88000 { reg = <0x88000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
@@ -586,9 +592,9 @@ status = "disabled"; }; - i2c9: i2c-bus@89000 { + i2c9: i2c@89000 { reg = <0x89000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
@@ -597,9 +603,9 @@ status = "disabled"; }; - i2c10: i2c-bus@8a000 { + i2c10: i2c@8a000 { reg = <0x8a000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
@@ -608,9 +614,9 @@ status = "disabled"; }; - i2c11: i2c-bus@8b000 { + i2c11: i2c@8b000 { reg = <0x8b000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
@@ -619,9 +625,9 @@ status = "disabled"; }; - i2c12: i2c-bus@8c000 { + i2c12: i2c@8c000 { reg = <0x8c000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
@@ -630,9 +636,9 @@ status = "disabled"; }; - i2c13: i2c-bus@8d000 { + i2c13: i2c@8d000 { reg = <0x8d000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
@@ -641,9 +647,9 @@ status = "disabled"; }; - i2c14: i2c-bus@8e000 { + i2c14: i2c@8e000 { reg = <0x8e000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
@@ -652,9 +658,9 @@ status = "disabled"; }; - i2c15: i2c-bus@8f000 { + i2c15: i2c@8f000 { reg = <0x8f000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
@@ -664,7 +670,8 @@ }; gfxi: gfxi@f000e000 { - compatible = "nuvoton,npcm750-gfxi", "syscon", "simple-mfd"; + compatible = "nuvoton,npcm750-gfxi", "syscon", + "simple-mfd"; reg = <0xf000e000 0x100>; };
@@ -1202,5 +1209,37 @@ groups = "clkreq"; function = "clkreq"; }; + hgpio0_pins: hgpio0-pins { + groups = "hgpio0"; + function = "hgpio0"; + }; + hgpio1_pins: hgpio1-pins { + groups = "hgpio1"; + function = "hgpio1"; + }; + hgpio2_pins: hgpio2-pins { + groups = "hgpio2"; + function = "hgpio2"; + }; + hgpio3_pins: hgpio3-pins { + groups = "hgpio3"; + function = "hgpio3"; + }; + hgpio4_pins: hgpio4-pins { + groups = "hgpio4"; + function = "hgpio4"; + }; + hgpio5_pins: hgpio5-pins { + groups = "hgpio5"; + function = "hgpio5"; + }; + hgpio6_pins: hgpio6-pins { + groups = "hgpio6"; + function = "hgpio6"; + }; + hgpio7_pins: hgpio7-pins { + groups = "hgpio7"; + function = "hgpio7"; + }; }; };
arch/arm/boot/dts/nuvoton-npcm750-evb.dts +121 -44
308 lines not on this page · raw message
arch/arm/boot/dts/nuvoton-npcm750-gpio.dtsi +4 -14
@@ -1,15 +1,5 @@ -/* - * DTSi file for the NPCM750 pin controller - * - * Copyright (c) 2014-2017 Nuvoton Technology corporation. - * - * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 - * - * http://www.opensource.org/licenses/gpl-license.html - * http://www.gnu.org/copyleft/gpl.html - */ - +// SPDX-License-Identifier: GPL-2.0 +// Copyright (c) 2018 Nuvoton Technology [email protected] / { pinctrl: pinctrl@f0800000 {
@@ -1107,10 +1097,10 @@ bias-disable; input-enable; }; - gpio132o_pins: gpio132o-pins { + gpio132_pins: gpio132-pins { pins = "GPIO132/SMB10SCL"; bias-disable; - output-high; + input-enable; }; gpio133_pins: gpio133-pins { pins = "GPIO133/SMB10SDA";
arch/arm/boot/dts/nuvoton-npcm750.dtsi +5 -5
@@ -44,7 +44,6 @@ }; }; - ahb { gmac1: eth@f0804000 { device_type = "network";
@@ -56,8 +55,8 @@ clocks = <&clk_rg2refck>, <&clk NPCM7XX_CLK_AHB>; clock-names = "stmmaceth", "clk_gmac"; pinctrl-names = "default"; - /*pinctrl-0 = <&rg2_pins - &rg2mdio_pins>;*/ + pinctrl-0 = <&rg2_pins + &rg2mdio_pins>; status = "disabled"; };
@@ -71,8 +70,9 @@ clock-names = "clk_emc"; pinctrl-names = "default"; pinctrl-0 = <&r2_pins - &r2err_pins - &r2md_pins>; + &r2err_pins + &r2md_pins>; + status = "disabled"; }; udc0:udc@f0830000 {
Signature · 1 line
2.14.1
Hi Tomer,
Quoted 4 lines · Tomer Maimon
Hi Joel,
Please add the following NPCM7xx patches to dev-4.19:
I applied your series and it does not compile. I am using the npcm7xx_defconfig you included:
arm-linux-gnueabi-ld: drivers/i2c/busses/i2c-npcm7xx.o: in function `npcm_smb_calc_crc8':drivers/i2c/busses/i2c-npcm7xx.c:423: undefined reference to `crc8'
arm-linux-gnueabi-ld: drivers/i2c/busses/i2c-npcm7xx.o: in function `__npcm_i2c_init':drivers/i2c/busses/i2c-npcm7xx.c:1668: undefined reference to crc8_populate_lsb' drivers/i2c/busses/i2c-npcm7xx.c:1669: undefined reference to crc8_populate_msb'
Please test the patchset exactly as you intend to send before sending it.
In this case you needed to add selects CRC8 to drivers/i2c/busses/Kconfig.
You also have some warnings. Please send follow up patches ASAP to resolve these:
../drivers/iio/adc/npcm_adc.c: In function ‘npcm_adc_probe’:../drivers/iio/adc/npcm_adc.c:301:9: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
return ret;
^~~arch/arm/boot/dts/nuvoton-npcm750-evb.dtb: Warning (pci_bridge):
/ahb/axi-pcie@e1000000: node name is not "pci" or "pcie" arch/arm/boot/dts/nuvoton-npcm750-evb.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge'
I have done this for you and the tree now builds. I've merged the patches into dev-4.19 and will push out once I've finished testing.
Cheers,
Joel
Tomer Maimon
maintainerHi Joel,
Thanks a lot for applying the patches
Quoted 21 lines · Joel Stanley
Hi Tomer,
Quoted 4 lines · Tomer Maimon
Hi Joel,
Please add the following NPCM7xx patches to dev-4.19:
I applied your series and it does not compile. I am using the
npcm7xx_defconfigyou included:arm-linux-gnueabi-ld:
drivers/i2c/busses/i2c-npcm7xx.o: in function `npcm_smb_calc_crc8':drivers/i2c/busses/i2c-npcm7xx.c:423: undefined reference to `crc8'
arm-linux-gnueabi-ld:drivers/i2c/busses/i2c-npcm7xx.o: in function `__npcm_i2c_init':drivers/i2c/busses/i2c-npcm7xx.c:1668: undefined reference tocrc8_populate_lsb' drivers/i2c/busses/i2c-npcm7xx.c:1669: undefined reference tocrc8_populate_msb'
Quoted 3 lines
Please test the patchset exactly as you intend to send before sending it.
I did test the patches with
https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads/8-2-2018-08
(gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabi)
So I do not understand why you get this failures
Quoted 6 lines
In this case you needed to add
selects CRC8todrivers/i2c/busses/Kconfig.You also have some warnings. Please send follow up patches ASAP to resolve these:
Quoted 7 lines
../drivers/iio/adc/npcm_adc.c: In function ‘npcm_adc_probe’:../drivers/iio/adc/npcm_adc.c:301:9: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]return ret; ^~~About the ADC patch you are right, somehow I didn't send the latest code
of the ADC driver. I will send it today.
Quoted 6 lines
arch/arm/boot/dts/nuvoton-npcm750-evb.dtb: Warning (pci_bridge):
/ahb/axi-pcie@e1000000: node name is not "pci" or "pcie"arch/arm/boot/dts/nuvoton-npcm750-evb.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge'In the patch set you can find patch
[linux dev-4.19 15/15] dts: npcm7xx: Modify NPCM7xx device tree It's fix the above warnings and modify other node. please apply it.
Quoted 7 lines
I have done this for you and the tree now builds. I've merged the patches into dev-4.19 and will push out once I've finished testing.
Cheers,
Joel
I will make sure to send all the fixes today.
Thanks a lot,
Tomer