[PATCH v2 3/3] ARM: dts: am335x: add support for Moxa UC-2101 open platform
Add support for Moxa UC-2101 open platform The UC-2101 computing platform is designed for industrial embedded data acquisition and processing applications. The features of UC-2101 are: * eMMC * SPI flash * 1x LAN * 1x RS-232/422/485 ports, software-selectable * EEPROM * TPM 2.0 * Watchdog * RTC * User gpio-keys * User LEDs * User button Signed-off-by: Wes Huang (黃淵河) Signed-off-by: Fero JD Zhou (周俊達) Signed-off-by: SZ Lin (林上智) --- Changes from v1: - Use property phy-handle instead of phy_id arch/arm/boot/dts/Makefile| 1 + arch/arm/boot/dts/am335x-moxa-uc-2101.dts | 69 +++ 2 files changed, 70 insertions(+) create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2101.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index fb548cf161e0..95def61bd21a 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -710,6 +710,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \ am335x-evmsk.dtb \ am335x-icev2.dtb \ am335x-lxm.dtb \ + am335x-moxa-uc-2101.dtb \ am335x-moxa-uc-8100-me-t.dtb \ am335x-nano.dtb \ am335x-pdu001.dtb \ diff --git a/arch/arm/boot/dts/am335x-moxa-uc-2101.dts b/arch/arm/boot/dts/am335x-moxa-uc-2101.dts new file mode 100644 index ..48aee6de4cdb --- /dev/null +++ b/arch/arm/boot/dts/am335x-moxa-uc-2101.dts @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 MOXA Inc. - https://www.moxa.com/ + * + * Authors: SZ Lin (林上智) + * Wes Huang (黃淵河) + * Fero JD Zhou (周俊達) + */ + +/dts-v1/; + +#include "am335x-moxa-uc-2100-common.dtsi" + +/ { + model = "Moxa UC-2101"; + compatible = "moxa,uc-2101", "ti,am33xx"; + + leds { + compatible = "gpio-leds"; + led1 { + label = "UC2100:GREEN:USER"; + gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ + AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */ + AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxerr.rmii1_rxerr */ + AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txen.rmii1_txen */ + AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */ + AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */ + AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */ + AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */ + AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_refclk.rmii1_refclk */ + >; + }; + + spi1_pins: pinmux_spi1 { + pinctrl-single,pins = < + AM33XX_IOPAD(0x964, PIN_INPUT_PULLUP | MUX_MODE4) /* ecap0_in_pwm0_out.spi1_sclk */ + AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE4) /* uart1_ctsn.spi1_cs0 */ + AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE4) /* uart0_ctsn.spi1_d0 */ + AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE4) /* uart0_rtsn.spi1_d1 */ + >; + }; +}; + +&davinci_mdio { + phy0: ethernet-phy@4 { + reg = <4>; + }; +}; + +&cpsw_emac0 { + status = "okay"; + phy-handle = <&phy0>; + phy-mode = "rmii"; +}; + +&cpsw_emac1 { + status = "disabled"; +}; -- 2.19.0
[PATCH v2 1/3] ARM: dts: am335x: add common file for UC-2100 series
The UC-2100 series consists many boards with different peripheral devices and wireless modules, hence we fetch common items and create a common dtsi file to increase reusability. All boards in UC-2100 series will include this common dtsi file. Signed-off-by: Wes Huang (黃淵河) Signed-off-by: Fero JD Zhou (周俊達) Signed-off-by: SZ Lin (林上智) --- .../boot/dts/am335x-moxa-uc-2100-common.dtsi | 249 ++ 1 file changed, 249 insertions(+) create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi diff --git a/arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi b/arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi new file mode 100644 index ..14f781953475 --- /dev/null +++ b/arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi @@ -0,0 +1,249 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 MOXA Inc. - https://www.moxa.com/ + * + * Authors: SZ Lin (林上智) + * Wes Huang (黃淵河) + * Fero JD Zhou (周俊達) + */ + +#include "am33xx.dtsi" + +/ { + vbat: vbat-regulator { + compatible = "regulator-fixed"; + }; + + /* Power supply provides a fixed 3.3V @3A */ + vmmcsd_fixed: vmmcsd-regulator { + compatible = "regulator-fixed"; + regulator-name = "vmmcsd_fixed"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + regulator-boot-on; + }; + + buttons: push_button { + compatible = "gpio-keys"; + }; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + + i2c0_pins: pinmux_i2c0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ + AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ + >; + }; + + push_button_pins: pinmux_push_button { + pinctrl-single,pins = < + AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.gpio2_23 */ + >; + }; + + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ + AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + >; + }; + + davinci_mdio_default: davinci_mdio_default { + pinctrl-single,pins = < + /* MDIO */ + AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ + AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + >; + }; + + mmc1_pins_default: pinmux_mmc1_pins { + pinctrl-single,pins = < + /* eMMC */ + AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad12.mmc1_dat0 */ + AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad13.mmc1_dat1 */ + AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad14.mmc1_dat2 */ + AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad15.mmc1_dat3 */ + AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad8.mmc1_dat4 */ + AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad9.mmc1_dat5 */ + AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad10.mmc1_dat6 */ + AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad11.mmc1_dat7 */ + AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */ + AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ + >; + }; + + spi0_pins: pinmux_spi0 { + pinctrl-single,pins = < + AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_sclk.spi0_sclk */ + AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_cs0.spi0_cs0 */ + AM33XX_IOPAD(0x954, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d0.spi0_d0 */ + AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d1.spi0_d1 */ + >; + }; +}; + +&uart0 { + /* Console */ + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>
[PATCH v2 2/3] dt-bindings: arm: omap: Add binding for Moxa UC-2101 open platform
Add devicetree binding for Moxa UC-2101 open platform Signed-off-by: SZ Lin (林上智) --- Documentation/devicetree/bindings/arm/omap/omap.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt index 2ecc712bf707..c5ca3d6a8099 100644 --- a/Documentation/devicetree/bindings/arm/omap/omap.txt +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt @@ -157,6 +157,9 @@ Boards: - AM335X phyCORE-AM335x: Development kit compatible = "phytec,am335x-pcm-953", "phytec,am335x-phycore-som", "ti,am33xx" +- AM335X UC-2100: Wireless-enabled palm-sized industrial computing platform + compatible = "moxa,uc-2101", "ti,am33xx" + - AM335X UC-8100-ME-T: Communication-centric industrial computing platform compatible = "moxa,uc-8100-me-t", "ti,am33xx"; -- 2.19.0
[PATCH v2 0/3] Add support for Moxa UC-2100 series
The UC-2100 series open computing platform is designed for industrial embedded data acquisition and processing applications. In order to fulfill various industrial applications, there're many boards with different peripheral devices and wireless modules in this series. The features of UC-2100 series are: * eMMC * SPI flash * {1,2}x LAN (100/1000 Mbps in option) * {1,2}x RS-232/422/485 ports, software-selectable * EEPROM * TPM 2.0 * Watchdog * RTC * User gpio-keys * User LEDs * User button * GPS (option) * 2x CANBus (option) * Cellular module (option) * Mini PCIe form factor with USB signal (option) * MicroSD slot (option) --- Changes from v1: - Use property phy-handle instead of phy_id - Separate DT binding docs and dts file - Remove am335x-moxa-uc-2102.dts SZ Lin (林上智) (3): ARM: dts: am335x: add common file for UC-2100 series dt-bindings: arm: omap: Add binding for Moxa UC-2101 open platform ARM: dts: am335x: add support for Moxa UC-2101 open platform .../devicetree/bindings/arm/omap/omap.txt | 3 + arch/arm/boot/dts/Makefile| 1 + .../boot/dts/am335x-moxa-uc-2100-common.dtsi | 249 ++ arch/arm/boot/dts/am335x-moxa-uc-2101.dts | 69 + 4 files changed, 322 insertions(+) create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2101.dts -- 2.19.0
Re: [PATCH 4.9 111/111] MIPS: VDSO: Drop gic_get_usm_range() usage
Hi, Guenter Roeck 於 2018年9月25日 週二 上午9:36寫道: > > On Mon, Sep 24, 2018 at 01:53:18PM +0200, Greg Kroah-Hartman wrote: > > 4.9-stable review patch. If anyone has any objections, please let me know. > > > > This patch breaks v4.4.y and v4.9.y builds. > It includes asm/mips-cps.h which doesn't exist in those releases. I am sorry for my fault, thanks for your report. Since the patch b025d51873d5fe6 "MIPS: CM: Specify register size when generating accessors" which created asm/mips-cps.h is not a bug-fixed patch, hence I will not backport this header. Hi Greg, Could you please help to revert this commit? This commit was intended to fix dependency of 70d7783 "MIPS: VDSO: Match data page cache colouring when D$ aliases", but I saw 70d7783 was merged before this commit; therefore, I don't think it is necessary to keep this commit. I apology for any inconvenience caused, and I will be more careful next time. SZ Lin (林上智) > > Building mips:malta_defconfig:smp:initrd ... failed > > Error log: > arch/mips/kernel/vdso.c:23:26: fatal error: asm/mips-cps.h: No such file or > directory > > Guenter > > > -- > > > > From: Paul Burton > > > > commit 00578cd864d45ae4b8fa3f684f8d6f783dd8d15d upstream. > > > > We don't really need gic_get_usm_range() to abstract discovery of the > > address of the GIC user-visible section now that we have access to its > > base address globally. > > > > Switch to calculating it ourselves, which will allow us to stop > > requiring the irqchip driver to care about a counter exposed to userland > > for use via the VDSO. > > > > Signed-off-by: Paul Burton > > Cc: Jason Cooper > > Cc: Marc Zyngier > > Cc: Thomas Gleixner > > Cc: linux-m...@linux-mips.org > > Patchwork: https://patchwork.linux-mips.org/patch/17040/ > > Signed-off-by: Ralf Baechle > > Signed-off-by: SZ Lin (林上智) > > Signed-off-by: Greg Kroah-Hartman > > --- > > arch/mips/kernel/vdso.c | 15 +-- > > 1 file changed, 5 insertions(+), 10 deletions(-) > > > > --- a/arch/mips/kernel/vdso.c > > +++ b/arch/mips/kernel/vdso.c > > @@ -13,7 +13,6 @@ > > #include > > #include > > #include > > -#include > > #include > > #include > > #include > > @@ -21,6 +20,7 @@ > > #include > > > > #include > > +#include > > #include > > #include > > > > @@ -101,9 +101,8 @@ int arch_setup_additional_pages(struct l > > { > > struct mips_vdso_image *image = current->thread.abi->vdso; > > struct mm_struct *mm = current->mm; > > - unsigned long gic_size, vvar_size, size, base, data_addr, vdso_addr; > > + unsigned long gic_size, vvar_size, size, base, data_addr, vdso_addr, > > gic_pfn; > > struct vm_area_struct *vma; > > - struct resource gic_res; > > int ret; > > > > if (down_write_killable(&mm->mmap_sem)) > > @@ -127,7 +126,7 @@ int arch_setup_additional_pages(struct l > >* only map a page even though the total area is 64K, as we only need > >* the counter registers at the start. > >*/ > > - gic_size = gic_present ? PAGE_SIZE : 0; > > + gic_size = mips_gic_present() ? PAGE_SIZE : 0; > > vvar_size = gic_size + PAGE_SIZE; > > size = vvar_size + image->size; > > > > @@ -168,13 +167,9 @@ int arch_setup_additional_pages(struct l > > > > /* Map GIC user page. */ > > if (gic_size) { > > - ret = gic_get_usm_range(&gic_res); > > - if (ret) > > - goto out; > > + gic_pfn = virt_to_phys(mips_gic_base + MIPS_GIC_USER_OFS) >> > > PAGE_SHIFT; > > > > - ret = io_remap_pfn_range(vma, base, > > - gic_res.start >> PAGE_SHIFT, > > - gic_size, > > + ret = io_remap_pfn_range(vma, base, gic_pfn, gic_size, > >pgprot_noncached(PAGE_READONLY)); > > if (ret) > > goto out; > > > >
RE: [PATCH 3/3] ARM: dts: am335x: add support for Moxa UC-2102 open platform
Hi, > The 2102 is a superset of the 2101? If so, the 2102 should come first. > If not, this should probably be 2 separate entries. > Nope, they use different SoC models and PMICs. I'll resend them separately in next version. Thanks for guidance. > > +&tps { > > + vcc1-supply = <&vbat>; > > + vcc2-supply = <&vbat>; > > + vcc3-supply = <&vbat>; > > + vcc4-supply = <&vbat>; > > + vcc5-supply = <&vbat>; > > + vcc6-supply = <&vbat>; > > + vcc7-supply = <&vbat>; > > + vccio-supply = <&vbat>; > > + > > + regulators { > > + vrtc_reg: regulator@0 { > > Without a reg property, you shouldn't have unit addresses. I would like to ask why shouldn't we keep unit address with "regulator-always-on;" reg property? SZ > > > > + regulator-always-on; > > + }; > > + > > + vio_reg: regulator@1 { > > + regulator-always-on; > > + }; > > + > > + vdd1_reg: regulator@2 { > > + /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% > > tolerance */ > > + regulator-name = "vdd_mpu"; > > + regulator-min-microvolt = <912500>; > > + regulator-max-microvolt = <1378000>; > > + regulator-boot-on; > > + regulator-always-on; > > + }; > > + > > + vdd2_reg: regulator@3 { > > + /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% > > tolerance */ > > + regulator-name = "vdd_core"; > > + regulator-min-microvolt = <912500>; > > + regulator-max-microvolt = <115>; > > + regulator-boot-on; > > + regulator-always-on; > > + }; > > + > > + vdd3_reg: regulator@4 { > > + regulator-always-on; > > + }; > > + > > + vdig1_reg: regulator@5 { > > + regulator-always-on; > > + }; > > + > > + vdig2_reg: regulator@6 { > > + regulator-always-on; > > + }; > > + > > + vpll_reg: regulator@7 { > > + regulator-always-on; > > + }; > > + > > + vdac_reg: regulator@8 { > > + regulator-always-on; > > + }; > > + > > + vaux1_reg: regulator@9 { > > + regulator-always-on; > > + }; > > + > > + vaux2_reg: regulator@10 { > > + regulator-always-on; > > + }; > > + > > + vaux33_reg: regulator@11 { > > + regulator-always-on; > > + }; > > + > > + vmmc_reg: regulator@12 { > > + compatible = "regulator-fixed"; > > + regulator-name = "vmmc_reg"; > > + regulator-min-microvolt = <330>; > > + regulator-max-microvolt = <330>; > > + regulator-always-on; > > + }; > > + }; > > +}; > > + > > +&mac { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&cpsw_default>; > > + dual_emac = <1>; > > + status = "okay"; > > +}; > > + > > +&cpsw_emac0 { > > + status = "okay"; > > + phy_id = <&davinci_mdio>, <0x4>; > > + phy-mode = "rmii"; > > + dual_emac_res_vlan = <1>; > > +}; > > + > > +&cpsw_emac1 { > > + status = "okay"; > > + phy_id = <&davinci_mdio>, <0x5>; > > + phy-mode = "rmii"; > > + dual_emac_res_vlan = <2>; > > +}; > > + > > +&mmc1 { > > + pinctrl-names = "default"; > > + vmmc-supply = <&vmmcsd_fixed>; > > + bus-width = <4>; > > + pinctrl-0 = <&mmc0_pins_default>; > > + cd-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; > > + wp-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>; > > + status = "okay"; > > +}; > > -- > > 2.19.0.rc1 > >
RE: [PATCH 2/3] ARM: dts: am335x: add support for Moxa UC-2101 open platform
Hi, > -Original Message- > From: Grygorii Strashko [mailto:grygorii.stras...@ti.com] > > Pls, use phy-handle instead of phy_id here and in the next patch. Thanks for the reminder, I will use phy-handle in next version. Furthermore, the property of "phy-handle" doesn't work properly in 4.4.y-stable kernel. I've fixed it and sent the backport patches to 4.4.y-stable [1][2][3][4]. [1] https://www.spinics.net/lists/stable/msg256121.html [2] https://www.spinics.net/lists/stable/msg256124.html [3] https://www.spinics.net/lists/stable/msg256131.html [4] https://www.spinics.net/lists/stable/msg256749.html > > > + phy-mode = "rmii"; > > +}; > > + > > +&cpsw_emac1 { > > + status = "disable"; > > +}; > > > > -- > regards, > -grygorii
[PATCH 0/3] ARM: dts: am335x: add support for Moxa UC-2100 series
The UC-2100 series open computing platform is designed for industrial embedded data acquisition and processing applications. In order to fulfill various industrial applications, there're many boards with different peripheral devices and wireless modules in this series. The features of UC-2100 series are: * eMMC * SPI flash * {1,2}x LAN (100/1000 Mbps in option) * {1,2}x RS-232/422/485 ports, software-selectable * EEPROM * TPM 2.0 * Watchdog * RTC * User gpio-keys * User LEDs * User button * GPS (option) * 2x CANBus (option) * Cellular module (option) * Mini PCIe form factor with USB signal (option) * MicroSD slot (option) SZ Lin (林上智) (3): ARM: dts: am335x: add common file for UC-2100 series ARM: dts: am335x: add support for Moxa UC-2101 open platform ARM: dts: am335x: add support for Moxa UC-2102 open platform .../devicetree/bindings/arm/omap/omap.txt | 3 + arch/arm/boot/dts/Makefile| 2 + .../boot/dts/am335x-moxa-uc-2100-common.dtsi | 249 ++ arch/arm/boot/dts/am335x-moxa-uc-2101.dts | 63 + arch/arm/boot/dts/am335x-moxa-uc-2102.dts | 200 ++ 5 files changed, 517 insertions(+) create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2101.dts create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2102.dts -- 2.19.0.rc1
[PATCH 1/3] ARM: dts: am335x: add common file for UC-2100 series
The UC-2100 series consists many boards with different peripheral devices and wireless modules, hence we fetch common items and create a common dtsi file to increase reusability. All boards in UC-2100 series will include this common dtsi file. Signed-off-by: Wes Huang (黃淵河) Signed-off-by: Fero JD Zhou (周俊達) Signed-off-by: SZ Lin (林上智) --- .../boot/dts/am335x-moxa-uc-2100-common.dtsi | 249 ++ 1 file changed, 249 insertions(+) create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi diff --git a/arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi b/arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi new file mode 100644 index ..14f781953475 --- /dev/null +++ b/arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi @@ -0,0 +1,249 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 MOXA Inc. - https://www.moxa.com/ + * + * Authors: SZ Lin (林上智) + * Wes Huang (黃淵河) + * Fero JD Zhou (周俊達) + */ + +#include "am33xx.dtsi" + +/ { + vbat: vbat-regulator { + compatible = "regulator-fixed"; + }; + + /* Power supply provides a fixed 3.3V @3A */ + vmmcsd_fixed: vmmcsd-regulator { + compatible = "regulator-fixed"; + regulator-name = "vmmcsd_fixed"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + regulator-boot-on; + }; + + buttons: push_button { + compatible = "gpio-keys"; + }; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + + i2c0_pins: pinmux_i2c0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ + AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ + >; + }; + + push_button_pins: pinmux_push_button { + pinctrl-single,pins = < + AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.gpio2_23 */ + >; + }; + + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ + AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ + >; + }; + + davinci_mdio_default: davinci_mdio_default { + pinctrl-single,pins = < + /* MDIO */ + AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ + AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ + >; + }; + + mmc1_pins_default: pinmux_mmc1_pins { + pinctrl-single,pins = < + /* eMMC */ + AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad12.mmc1_dat0 */ + AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad13.mmc1_dat1 */ + AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad14.mmc1_dat2 */ + AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad15.mmc1_dat3 */ + AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad8.mmc1_dat4 */ + AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad9.mmc1_dat5 */ + AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad10.mmc1_dat6 */ + AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad11.mmc1_dat7 */ + AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */ + AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ + >; + }; + + spi0_pins: pinmux_spi0 { + pinctrl-single,pins = < + AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_sclk.spi0_sclk */ + AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_cs0.spi0_cs0 */ + AM33XX_IOPAD(0x954, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d0.spi0_d0 */ + AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d1.spi0_d1 */ + >; + }; +}; + +&uart0 { + /* Console */ + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>
[PATCH 2/3] ARM: dts: am335x: add support for Moxa UC-2101 open platform
Add support for Moxa UC-2101 open platform The UC-2101 computing platform is designed for industrial embedded data acquisition and processing applications. The features of UC-2101 are: * eMMC * SPI flash * 1x LAN * 1x RS-232/422/485 ports, software-selectable * EEPROM * TPM 2.0 * Watchdog * RTC * User gpio-keys * User LEDs * User button Signed-off-by: Wes Huang (黃淵河) Signed-off-by: Fero JD Zhou (周俊達) Signed-off-by: SZ Lin (林上智) --- .../devicetree/bindings/arm/omap/omap.txt | 3 + arch/arm/boot/dts/Makefile| 1 + arch/arm/boot/dts/am335x-moxa-uc-2101.dts | 63 +++ 3 files changed, 67 insertions(+) create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2101.dts diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt index 2ecc712bf707..c5ca3d6a8099 100644 --- a/Documentation/devicetree/bindings/arm/omap/omap.txt +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt @@ -157,6 +157,9 @@ Boards: - AM335X phyCORE-AM335x: Development kit compatible = "phytec,am335x-pcm-953", "phytec,am335x-phycore-som", "ti,am33xx" +- AM335X UC-2100: Wireless-enabled palm-sized industrial computing platform + compatible = "moxa,uc-2101", "ti,am33xx" + - AM335X UC-8100-ME-T: Communication-centric industrial computing platform compatible = "moxa,uc-8100-me-t", "ti,am33xx"; diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index b5bd3de87c33..6167c068601c 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -706,6 +706,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \ am335x-evmsk.dtb \ am335x-icev2.dtb \ am335x-lxm.dtb \ + am335x-moxa-uc-2101.dtb \ am335x-moxa-uc-8100-me-t.dtb \ am335x-nano.dtb \ am335x-pdu001.dtb \ diff --git a/arch/arm/boot/dts/am335x-moxa-uc-2101.dts b/arch/arm/boot/dts/am335x-moxa-uc-2101.dts new file mode 100644 index ..d0c1eea4a6c9 --- /dev/null +++ b/arch/arm/boot/dts/am335x-moxa-uc-2101.dts @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 MOXA Inc. - https://www.moxa.com/ + * + * Authors: SZ Lin (林上智) + * Wes Huang (黃淵河) + * Fero JD Zhou (周俊達) + */ + +/dts-v1/; + +#include "am335x-moxa-uc-2100-common.dtsi" + +/ { + model = "Moxa UC-2101"; + compatible = "moxa,uc-2101", "ti,am33xx"; + + leds { + compatible = "gpio-leds"; + led1 { + label = "UC2100:GREEN:USER"; + gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ + AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */ + AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxerr.rmii1_rxerr */ + AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txen.rmii1_txen */ + AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */ + AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */ + AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */ + AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */ + AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_refclk.rmii1_refclk */ + >; + }; + + spi1_pins: pinmux_spi1 { + pinctrl-single,pins = < + AM33XX_IOPAD(0x964, PIN_INPUT_PULLUP | MUX_MODE4) /* ecap0_in_pwm0_out.spi1_sclk */ + AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE4) /* uart1_ctsn.spi1_cs0 */ + AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE4) /* uart0_ctsn.spi1_d0 */ + AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE4) /* uart0_rtsn.spi1_d1 */ + >; + }; +}; + +&cpsw_emac0 { + status = "okay"; + phy_id = <&davinci_mdio>, <0x4>; + phy-mode = "rmii"; +}; + +&cpsw_emac1 { + status = "disable"; +}; -- 2.19.0.rc1
[PATCH 3/3] ARM: dts: am335x: add support for Moxa UC-2102 open platform
Add support for Moxa UC-2102 open platform The UC-2102 computing platform is designed for industrial embedded data acquisition and processing applications. The features of UC-2102 are: * eMMC * SPI flash * 2x LAN * EEPROM * TPM 2.0 * Watchdog * RTC * User gpio-keys * User LEDs * User button Signed-off-by: Wes Huang (黃淵河) Signed-off-by: Fero JD Zhou (周俊達) Signed-off-by: SZ Lin (林上智) --- .../devicetree/bindings/arm/omap/omap.txt | 2 +- arch/arm/boot/dts/Makefile| 1 + arch/arm/boot/dts/am335x-moxa-uc-2102.dts | 200 ++ 3 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/am335x-moxa-uc-2102.dts diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt index c5ca3d6a8099..6876eb8263ed 100644 --- a/Documentation/devicetree/bindings/arm/omap/omap.txt +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt @@ -158,7 +158,7 @@ Boards: compatible = "phytec,am335x-pcm-953", "phytec,am335x-phycore-som", "ti,am33xx" - AM335X UC-2100: Wireless-enabled palm-sized industrial computing platform - compatible = "moxa,uc-2101", "ti,am33xx" + compatible = "moxa,uc-2101", "moxa,uc-2102", "ti,am33xx" - AM335X UC-8100-ME-T: Communication-centric industrial computing platform compatible = "moxa,uc-8100-me-t", "ti,am33xx"; diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 6167c068601c..15d52cabb1a0 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -707,6 +707,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \ am335x-icev2.dtb \ am335x-lxm.dtb \ am335x-moxa-uc-2101.dtb \ + am335x-moxa-uc-2102.dtb \ am335x-moxa-uc-8100-me-t.dtb \ am335x-nano.dtb \ am335x-pdu001.dtb \ diff --git a/arch/arm/boot/dts/am335x-moxa-uc-2102.dts b/arch/arm/boot/dts/am335x-moxa-uc-2102.dts new file mode 100644 index ..94a7ecc9eb9a --- /dev/null +++ b/arch/arm/boot/dts/am335x-moxa-uc-2102.dts @@ -0,0 +1,200 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 MOXA Inc. - https://www.moxa.com/ + * + * Authors: SZ Lin (林上智) + * Wes Huang (黃淵河) + * Fero JD Zhou (周俊達) + */ + +/dts-v1/; + +#include "am335x-moxa-uc-2100-common.dtsi" + +/ { + model = "Moxa UC-2102"; + compatible = "moxa,uc-2102", "ti,am33xx"; + + leds { + compatible = "gpio-leds"; + led1 { + label = "UC2100:GREEN:USER1"; + gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + led2 { + label = "UC2100:GREEN:USER2"; + gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; +}; + +&am33xx_pinmux { + pinctrl-names = "default"; + + cpsw_default: cpsw_default { + pinctrl-single,pins = < + /* Slave 1 */ + AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */ + AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxerr.rmii1_rxerr */ + AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txen.rmii1_txen */ + AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */ + AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */ + AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */ + AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */ + AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_refclk.rmii1_refclk */ + + /* Slave 2 */ + AM33XX_IOPAD(0x870, PIN_INPUT_PULLDOWN | MUX_MODE3) /* gpmc_wait0.rmii2_crs_dv */ + AM33XX_IOPAD(0x874, PIN_INPUT_PULLDOWN | MUX_MODE3) /* gpmc_wpn.rmii2_rxer */ + AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* gpmc_a0.rmii2_txen */ + AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* gpmc_a5.rmii2_td0 */ + AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* gpmc_a4.rmii2_td1 */ + AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE3) /* gpmc_a11.rmii2_rd0 */ + AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE3) /* gpmc_a10.rmii2_rd1 */ + AM33XX_IOPAD(0x908,
RE: [PATCH] USB: serial: option: adding support for ublox R410M
> > Option is likely the right driver for this device. > > qcaux was mainly for mobile phones that have a TTY (often cdc-acm) as the > modem port > and a secondary DIAG/DM port driven by qcaux. The DM port doesn't have an > interrupt > endpoint thus it's not a normal modem port requiring the larger buffers of > option and its > control signaling. > > qcserial (as Bjorn mentioned) is only for actual Gobi-type devices with the > specific layouts > and the firmware loading requirement where the 1K and 2K devices start in a > special > 1-port mode waiting for firmware and then become 4-port devices on firmware > reboot. > > Dan Thank you all. I believe that many people are confused in selecting serial driver (option and qcserial) for QUALCOMM based module. This thread has provided clearly and properly presented the different between them. SZ
[PATCH] NET: usb: qmi_wwan: add support for ublox R410M PID 0x90b2
This patch adds support for PID 0x90b2 of ublox R410M. qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer [/dev/cdc-wdm0] Device manufacturer retrieved: Manufacturer: 'u-blox' qmicli -d /dev/cdc-wdm0 --dms-get-model [/dev/cdc-wdm0] Device model retrieved: Model: 'SARA-R410M-02B' Signed-off-by: SZ Lin (林上智) Cc: stable --- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index c853e7410f5a..51c68fc416fa 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -1098,6 +1098,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x05c6, 0x9080, 8)}, {QMI_FIXED_INTF(0x05c6, 0x9083, 3)}, {QMI_FIXED_INTF(0x05c6, 0x9084, 4)}, + {QMI_FIXED_INTF(0x05c6, 0x90b2, 3)},/* ublox R410M */ {QMI_FIXED_INTF(0x05c6, 0x920d, 0)}, {QMI_FIXED_INTF(0x05c6, 0x920d, 5)}, {QMI_QUIRK_SET_DTR(0x05c6, 0x9625, 4)}, /* YUGA CLM920-NC5 */ -- 2.17.0
[PATCH] USB: serial: option: adding support for ublox R410M
This patch adds support for ublox R410M PID 0x90b2 USB modem to option driver, this module supports LTE Cat M1 / NB1. Interface layout: 0: QCDM/DIAG 1: ADB 2: AT 3: RMNET Signed-off-by: SZ Lin (林上智) Cc: stable --- Please refer to following lsusb output: Bus 001 Device 003: ID 05c6:90b2 Qualcomm, Inc. Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize064 idVendor 0x05c6 Qualcomm, Inc. idProduct 0x90b2 bcdDevice0.00 iManufacturer 3 Qualcomm, Incorporated iProduct2 Qualcomm CDMA Technologies MSM iSerial 4 fb854106 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 108 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 1 Qualcomm Configuration bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass255 Vendor Specific Subclass bInterfaceProtocol255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass255 Vendor Specific Subclass bInterfaceProtocol255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber2 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass255 Vendor Specific Subclass bInterfaceProtocol255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes3 Transfer TypeInterrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber3 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass255 Vendor Specific Subclass bInterfaceProtocol255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength
[RESEND PATCH] rtc: tps65910: add bounds checking
Since tm->tm_year is the offset relative to 1900, it needs to check for positive value to avoid overflow in YEARS_REG register. The system will hang at the following stage on the next boot when overflow has occurred. [2.221192] systemd[1]: Time has been changed This patch fixes the above hanging issue by adding bounds checking. Signed-off-by: Taiyi Wu Signed-off-by: SZ Lin (林上智) --- drivers/rtc/rtc-tps65910.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c index d0244d7979fc..6be9f7bb0f1b 100644 --- a/drivers/rtc/rtc-tps65910.c +++ b/drivers/rtc/rtc-tps65910.c @@ -105,6 +105,12 @@ static int tps65910_rtc_set_time(struct device *dev, struct rtc_time *tm) struct tps65910 *tps = dev_get_drvdata(dev->parent); int ret; + if ((tm->tm_year - 100) < 0) { + dev_err(dev, "the requested year %d is unsupported\n", + 1900 + tm->tm_year); + return -EINVAL; + } + rtc_data[0] = bin2bcd(tm->tm_sec); rtc_data[1] = bin2bcd(tm->tm_min); rtc_data[2] = bin2bcd(tm->tm_hour); -- 2.17.0
[PATCH v2] net: ethernet: ti: cpsw: add check for in-band mode setting with RGMII PHY interface
According to AM335x TRM[1] 14.3.6.2, AM437x TRM[2] 15.3.6.2 and DRA7 TRM[3] 24.11.4.8.7.3.3, in-band mode in EXT_EN(bit18) register is only available when PHY is configured in RGMII mode with 10Mbps speed. It will cause some networking issues without RGMII mode, such as carrier sense errors and low throughput. TI also mentioned this issue in their forum[4]. This patch adds the check mechanism for PHY interface with RGMII interface type, the in-band mode can only be set in RGMII mode with 10Mbps speed. References: [1]: https://www.ti.com/lit/ug/spruh73p/spruh73p.pdf [2]: http://www.ti.com/lit/ug/spruhl7h/spruhl7h.pdf [3]: http://www.ti.com/lit/ug/spruic2b/spruic2b.pdf [4]: https://e2e.ti.com/support/arm/sitara_arm/f/791/p/640765/2392155 Suggested-by: Holsety Chen (陳憲輝) Signed-off-by: SZ Lin (林上智) Signed-off-by: Schuyler Patton --- Changes from v1: - Use phy_interface_is_rgmii helper function - Remove blank line drivers/net/ethernet/ti/cpsw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 1b1b78fdc138..b2b30c9df037 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1014,7 +1014,8 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave, /* set speed_in input in case RMII mode is used in 100Mbps */ if (phy->speed == 100) mac_control |= BIT(15); - else if (phy->speed == 10) + /* in band mode only works in 10Mbps RGMII mode */ + else if ((phy->speed == 10) && phy_interface_is_rgmii(phy)) mac_control |= BIT(18); /* In Band mode */ if (priv->rx_pause) -- 2.16.2
[PATCH] net: ethernet: ti: cpsw: add check for in-band mode setting with RGMII PHY interface
According to AM335x TRM[1] 14.3.6.2, AM437x TRM[2] 15.3.6.2 and DRA7 TRM[3] 24.11.4.8.7.3.3, in-band mode in EXT_EN(bit18) register is only available when PHY is configured in RGMII mode with 10Mbps speed. It will cause some networking issues without RGMII mode, such as carrier sense errors and low throughput. TI also mentioned this issue in their forum[4]. This patch adds the check mechanism for PHY interface with RGMII interface type, the in-band mode can only be set in RGMII mode with 10Mbps speed. References: [1]: https://www.ti.com/lit/ug/spruh73p/spruh73p.pdf [2]: http://www.ti.com/lit/ug/spruhl7h/spruhl7h.pdf [3]: http://www.ti.com/lit/ug/spruic2b/spruic2b.pdf [4]: https://e2e.ti.com/support/arm/sitara_arm/f/791/p/640765/2392155 Suggested-by: Holsety Chen (陳憲輝) Signed-off-by: SZ Lin (林上智) Signed-off-by: Schuyler Patton --- drivers/net/ethernet/ti/cpsw.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 1b1b78fdc138..3bbf22ed59cf 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1014,7 +1014,13 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave, /* set speed_in input in case RMII mode is used in 100Mbps */ if (phy->speed == 100) mac_control |= BIT(15); - else if (phy->speed == 10) + + /* in band mode only works in 10Mbps RGMII mode */ + else if ((phy->speed == 10) && +((phy->interface == PHY_INTERFACE_MODE_RGMII) || +(phy->interface == PHY_INTERFACE_MODE_RGMII_ID) || +(phy->interface == PHY_INTERFACE_MODE_RGMII_RXID) || +(phy->interface == PHY_INTERFACE_MODE_RGMII_TXID))) mac_control |= BIT(18); /* In Band mode */ if (priv->rx_pause) -- 2.16.2
[PATCH] rtc: tps65910: add bounds checking
Since tm->tm_year is the offset relative to 1900, it needs to check for positive value to avoid overflow in YEARS_REG register. The system will hang at the following stage on the next boot when overflow has occurred. [2.221192] systemd[1]: Time has been changed This patch fixes the above hanging issue by adding bounds checking. Signed-off-by: Taiyi Wu Signed-off-by: SZ Lin (林上智) --- drivers/rtc/rtc-tps65910.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c index d0244d7979fc..6be9f7bb0f1b 100644 --- a/drivers/rtc/rtc-tps65910.c +++ b/drivers/rtc/rtc-tps65910.c @@ -105,6 +105,12 @@ static int tps65910_rtc_set_time(struct device *dev, struct rtc_time *tm) struct tps65910 *tps = dev_get_drvdata(dev->parent); int ret; + if ((tm->tm_year - 100) < 0) { + dev_err(dev, "the requested year %d is unsupported\n", + 1900 + tm->tm_year); + return -EINVAL; + } + rtc_data[0] = bin2bcd(tm->tm_sec); rtc_data[1] = bin2bcd(tm->tm_min); rtc_data[2] = bin2bcd(tm->tm_hour); -- 2.15.1
[PATCH] NET: usb: qmi_wwan: add support for YUGA CLM920-NC5 PID 0x9625
This patch adds support for PID 0x9625 of YUGA CLM920-NC5. YUGA CLM920-NC5 needs to enable QMI_WWAN_QUIRK_DTR before QMI operation. qmicli -d /dev/cdc-wdm0 -p --dms-get-revision [/dev/cdc-wdm0] Device revision retrieved: Revision: 'CLM920_NC5-V1 1 [Oct 23 2016 19:00:00]' Signed-off-by: SZ Lin (林上智) --- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 3000ddd1c7e2..728819feab44 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -1100,6 +1100,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x05c6, 0x9084, 4)}, {QMI_FIXED_INTF(0x05c6, 0x920d, 0)}, {QMI_FIXED_INTF(0x05c6, 0x920d, 5)}, + {QMI_QUIRK_SET_DTR(0x05c6, 0x9625, 4)}, /* YUGA CLM920-NC5 */ {QMI_FIXED_INTF(0x0846, 0x68a2, 8)}, {QMI_FIXED_INTF(0x12d1, 0x140c, 1)},/* Huawei E173 */ {QMI_FIXED_INTF(0x12d1, 0x14ac, 1)},/* Huawei E1820 */ -- 2.15.1
RE: [PATCH v2] USB: serial: option: adding support for YUGA CLM920-NC5
> On Tue, Dec 19, 2017 at 11:14:37AM +0100, Johan Hovold wrote: > > On Tue, Dec 19, 2017 at 11:11:43AM +0100, Johan Hovold wrote: > > > On Tue, Dec 19, 2017 at 05:40:32PM +0800, SZ Lin (林上智) wrote: > > > > This patch adds support for YUGA CLM920-NC5 PID 0x9625 USB modem > > > > to option driver. > > > > > > > > Interface layout: > > > > 0: QCDM/DIAG > > > > 1: ADB > > > > 2: MODEM > > > > 3: AT > > > > 4: RMNET > > > > > > > > Signed-off-by: Taiyi Wu > > > > Signed-off-by: SZ Lin (林上智) > > > > --- > > > > Changes from v1: > > > > - Fix typo > > > > - Remove QCDM/DIAG interface in blacklist > > > > > > Thanks for the v2. Patch looks good now, but it seems your name > > > cannot be represented in UTF-8 (or my setup is broken). > > > > > > I see you have used the latin version "SF Lin" in the past so that > > > should be fine. I was just asking to make sure "SF" wasn't an > > > acronym or nickname. > > > > Sorry, I meant "SZ Lin" of course. > > > > > Care to resend a v3 with your original From and Signed-off-by? > > Nevermind, it seems it's just my terminals that can't represent it. I'll > apply the patch as is. > Thank you and thanks to Bjorn. > Sorry about the noise. > > Johan
RE: [PATCH v2] USB: serial: option: adding support for YUGA CLM920-NC5
> -Original Message- > From: Johan Hovold [mailto:jhov...@gmail.com] On Behalf Of Johan Hovold > Sent: Tuesday, December 19, 2017 6:12 PM > To: SZ Lin (林上智) > Cc: bj...@mork.no; Taiyi TY Wu (吳泰毅); Johan Hovold; Greg Kroah-Hartman; > linux-...@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH v2] USB: serial: option: adding support for YUGA > CLM920-NC5 > > On Tue, Dec 19, 2017 at 05:40:32PM +0800, SZ Lin (林上智) wrote: > > This patch adds support for YUGA CLM920-NC5 PID 0x9625 USB modem to > > option driver. > > > > Interface layout: > > 0: QCDM/DIAG > > 1: ADB > > 2: MODEM > > 3: AT > > 4: RMNET > > > > Signed-off-by: Taiyi Wu > > Signed-off-by: SZ Lin (林上智) > > --- > > Changes from v1: > > - Fix typo > > - Remove QCDM/DIAG interface in blacklist > > Thanks for the v2. Patch looks good now, but it seems your name cannot be > represented in > UTF-8 (or my setup is broken). > > I see you have used the latin version "SF Lin" in the past so that should be > fine. I was just > asking to make sure "SF" wasn't an acronym or nickname. > > Care to resend a v3 with your original From and Signed-off-by? > SZ Lin (林上智) is my legal name, but it causes garbled issue in some environment. Therefore, I usually use SZ Lin as my legal name in patch. > Thanks, > Johan
[PATCH v2] USB: serial: option: adding support for YUGA CLM920-NC5
This patch adds support for YUGA CLM920-NC5 PID 0x9625 USB modem to option driver. Interface layout: 0: QCDM/DIAG 1: ADB 2: MODEM 3: AT 4: RMNET Signed-off-by: Taiyi Wu Signed-off-by: SZ Lin (林上智) --- Changes from v1: - Fix typo - Remove QCDM/DIAG interface in blacklist drivers/usb/serial/option.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 3b3513874cfd..8a50226379b0 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -233,6 +233,8 @@ static void option_instat_callback(struct urb *urb); /* These Quectel products use Qualcomm's vendor ID */ #define QUECTEL_PRODUCT_UC20 0x9003 #define QUECTEL_PRODUCT_UC15 0x9090 +/* These Yuga products use Qualcomm's vendor ID */ +#define YUGA_PRODUCT_CLM920_NC50x9625 #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ @@ -674,6 +676,10 @@ static const struct option_blacklist_info cinterion_rmnet2_blacklist = { .reserved = BIT(4) | BIT(5), }; +static const struct option_blacklist_info yuga_clm920_nc5_blacklist = { + .reserved = BIT(1) | BIT(4), +}; + static const struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, @@ -1178,6 +1184,9 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)}, { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20), .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + /* Yuga products use Qualcomm vendor ID */ + { USB_DEVICE(QUALCOMM_VENDOR_ID, YUGA_PRODUCT_CLM920_NC5), + .driver_info = (kernel_ulong_t)&yuga_clm920_nc5_blacklist }, /* Quectel products using Quectel vendor ID */ { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21), .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, -- 2.15.1
RE: [PATCH] USB: serial: option: adding support for YUGA CLM920-NC5
> -Original Message- > From: Bjørn Mork [mailto:bj...@mork.no] > Sent: Tuesday, December 19, 2017 2:44 AM > To: SZ Lin (林上智) > Cc: Johan Hovold; Taiyi TY Wu (吳泰毅); Greg Kroah-Hartman; > linux-...@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] USB: serial: option: adding support for YUGA CLM920-NC5 > > Johan Hovold writes: > > >> +static const struct option_blacklist_info yuga_clm920_nc5_blacklist = { > >> + .reserved = BIT(0) | BIT(1) | BIT(4), }; > > > > Do you really need to blacklist the first interface? > > Good question. Interface #0 does look a lot like a Qualcomm DM/DIAG function, > based > on two bulk endpoints, no additional descriptors and the fact that it is the > first interface. > If so, then we do want a serial driver for it. There is a basic libqcdm > implementation in > ModemManager if you want to test it out. > I have confirmed that interface #0 is QCDM/DIAG port in this module, and thus I will remove this from reserved list in next patch. Furthermore, interface #1 is ADB port. Should I also remove this from reserved list? > And I expect interface #4 is QMI/rmnet? Feel free to confirm that assumption > with a > patch against qmi_wwan :-) > Yes, it is. I will send qmi_wwan patch by all means. > > Bjørn SZ
[RESEND] ARM: dts: ls1021a: Add support for QSPI with ls1021a SoC
> > Add QSPI node support, and this function is disabled by default This > > setting could be overwritten in board-level definitions > > Adding Shawn Guo. > This patch is modified based on https://patchwork.ozlabs.org/patch/492099/. The originator of this patch is Haikun Wang. > > Signed-off-by: Haikun Wang > > Signed-off-by: SZ Lin > > Acked-by: Li Yang > > > --- > > arch/arm/boot/dts/ls1021a.dtsi | 14 ++ > > 1 file changed, 14 insertions(+) > > > > diff --git a/arch/arm/boot/dts/ls1021a.dtsi > > b/arch/arm/boot/dts/ls1021a.dtsi index 7bb9df2c1460..9da876e47810 > > 100644 > > --- a/arch/arm/boot/dts/ls1021a.dtsi > > +++ b/arch/arm/boot/dts/ls1021a.dtsi > > @@ -154,6 +154,20 @@ > > big-endian; > > }; > > > > + qspi: quadspi@155 { > > + compatible = "fsl,ls1021a-qspi"; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + reg = <0x0 0x155 0x0 0x1>, > > + <0x0 0x4000 0x0 0x4000>; > > + reg-names = "QuadSPI", "QuadSPI-memory"; > > + interrupts = ; > > + clock-names = "qspi_en", "qspi"; > > + clocks = <&clockgen 4 1>, <&clockgen 4 1>; > > + big-endian; > > + status = "disabled"; > > + }; > > + > > esdhc: esdhc@156 { > > compatible = "fsl,esdhc"; > > reg = <0x0 0x156 0x0 0x1>; > > -- > > 2.14.1 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe devicetree" > > in the body of a message to majord...@vger.kernel.org More majordomo > > info at http://vger.kernel.org/majordomo-info.html
RE: [RESEND PATCH] ARM: dts: ls1021a: Add support for QSPI with ls1021a SoC
> Add QSPI node support, and this function is disabled by default This setting > could be overwritten > in board-level definitions > > Signed-off-by: SZ Lin > --- This is a resend patch [1]. Any feedback would be greatly appreciated! ref: [1]: https://patchwork.kernel.org/patch/9889431/ Best regards, SZ Lin
Re: [PATCH] ARM: dts: ls1021a: Add support for QSPI with ls1021a SoC
> Add QSPI node support, and this function is disabled by default > This setting could be overwritten in board-level definitions > > Signed-off-by: SZ Lin > --- Any feedback? Best regards, SZ Lin