Re: [PATCH] mtd: spi-nor: macronix: Add block protection support to mx25u6435f

2021-04-15 Thread Ikjoon Jang
On Wed, Apr 14, 2021 at 12:53:24PM +0200, Michael Walle wrote: > Hi, > > Am 2021-04-14 08:53, schrieb Ikjoon Jang: > > On Tue, Apr 13, 2021 at 8:26 PM Michael Walle wrote: > > > Am 2021-04-13 14:02, schrieb Ikjoon Jang: > > > > This patch adds block protectio

[PATCH v5 2/2] HID: google: Add of_match table to Whiskers switch device.

2021-04-14 Thread Ikjoon Jang
Add a device tree match table for "cros-cbas" switch device. Signed-off-by: Ikjoon Jang Reviewed-by: Dmitry Torokhov Acked-by: Jiri Kosina --- (no changes since v1) Please note that v3 was submitted in 28 Oct 2019, 1.5yrs ago. Link(v2): https://patchwork.kernel.org/project/l

[PATCH v5 1/2] mfd: google,cros-ec: add DT bindings for a baseboard's switch device

2021-04-14 Thread Ikjoon Jang
This is for ChromeOS tablets which have a 'cros_cbas' switch device in the "Whiskers" base board. This device can be instantiated only by device tree on ARM platforms. ChromeOS EC doesn't provide a way to probe the device. Signed-off-by: Ikjoon Jang --- Changes in

[PATCH v5 0/2] HID: google: add device tree bindings for Whiskers switch device

2021-04-14 Thread Ikjoon Jang
hanges in v4: Define cros-cbase bindings inside google,cros-ec.yaml instead of a separated binding document. Ikjoon Jang (2): mfd: google,cros-ec: add DT bindings for a baseboard's switch device HID: google: Add of_match table to Whiskers switch device. .../bindings/mfd/goo

[PATCH v2] arm64: dts: mt8183: Add power-domains properity to mfgcfg

2021-04-14 Thread Ikjoon Jang
mfgcfg clock is under MFG_ASYNC power domain Signed-off-by: Weiyi Lu Signed-off-by: Ikjoon Jang --- Changes in v2: Fix a wrong power domain reference (scpsys to spm). Link(v1): https://patchwork.kernel.org/project/linux-mediatek/patch/20210224091742.1060508-1-i...@chromium.org/#23997681

Re: [PATCH] mtd: spi-nor: macronix: Add block protection support to mx25u6435f

2021-04-13 Thread Ikjoon Jang
HI Michael, thanks for the review. On Tue, Apr 13, 2021 at 8:26 PM Michael Walle wrote: > > Hi Ikjoon, > > Am 2021-04-13 14:02, schrieb Ikjoon Jang: > > This patch adds block protection support to Macronix mx25u6432f and > > mx25u6435f. Two different chips share the

Re: [PATCH v4 1/2] mfd: google,cros-ec: add DT bindings for a baseboard's switch device

2021-04-13 Thread Ikjoon Jang
On Tue, Apr 13, 2021 at 10:57 PM Rob Herring wrote: > > On Mon, Apr 12, 2021 at 07:30:19PM +0800, Ikjoon Jang wrote: > > This is for ChromeOS tablets which have a 'cros_cbas' switch device > > in the "Whiskers" base board. This device can be instantiated on

[PATCH] mtd: spi-nor: macronix: Add block protection support to mx25u6435f

2021-04-13 Thread Ikjoon Jang
a new spi_nor_locking_ops only for macronix until this could be merged into a generic swp implementation. Signed-off-by: Ikjoon Jang --- drivers/mtd/spi-nor/macronix.c | 193 - 1 file changed, 192 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor

[PATCH v4 2/2] HID: google: Add of_match table to Whiskers switch device.

2021-04-12 Thread Ikjoon Jang
Add a device tree match table for "cros-cbas" switch device. Signed-off-by: Ikjoon Jang Reviewed-by: Dmitry Torokhov Acked-by: Jiri Kosina --- (no changes since v1) Please note that v3 was submitted in 28 Oct 2019, 1.5yrs ago. Link(v2): https://patchwork.kernel.org/project/l

[PATCH v4 1/2] mfd: google,cros-ec: add DT bindings for a baseboard's switch device

2021-04-12 Thread Ikjoon Jang
This is for ChromeOS tablets which have a 'cros_cbas' switch device in the "Whiskers" base board. This device can be instantiated only by device tree on ARM platforms. ChromeOS EC doesn't provide a way to probe the device. Signed-off-by: Ikjoon Jang --- Changes

[PATCH v4 0/2] HID: google: add device tree bindings for Whiskers switch device

2021-04-12 Thread Ikjoon Jang
Add device a tree binding for a "cros-cbas" switch device of ChromeOS tablets with Whiskers base board. Changes in v4: Define cros-cbase bindings inside google,cros-ec.yaml instead of a seperated binding document. Ikjoon Jang (2): mfd: google,cros-ec: add DT bindings for a baseboar

Re: [PATCH 4/6] usb: xhci-mtk: add support runtime PM

2021-04-11 Thread Ikjoon Jang
On Fri, Apr 9, 2021 at 4:54 PM Chunfeng Yun wrote: > > On Fri, 2021-04-09 at 13:45 +0800, Ikjoon Jang wrote: > > On Thu, Apr 8, 2021 at 5:35 PM Chunfeng Yun > > wrote: > > > > > > A dedicated wakeup irq will be used to handle runtime suspend/resume, > &

Re: [PATCH 4/6] usb: xhci-mtk: add support runtime PM

2021-04-08 Thread Ikjoon Jang
On Thu, Apr 8, 2021 at 5:35 PM Chunfeng Yun wrote: > > A dedicated wakeup irq will be used to handle runtime suspend/resume, > we use dev_pm_set_dedicated_wake_irq API to take care of requesting > and attaching wakeup irq, then the suspend/resume framework will help > to enable/disable wakeup irq.

Re: [PATCH 1/6] PM: runtime: enable wake irq after runtime_suspend hook called

2021-04-08 Thread Ikjoon Jang
Hi Chunfeng, On Thu, Apr 8, 2021 at 5:35 PM Chunfeng Yun wrote: > > When the dedicated wake irq is level trigger, enable it before > calling runtime_suspend, will trigger an interrupt. > > e.g. > for a low level trigger type, it's low level at running time (0), > and becomes high level when enter

[PATCH 1/2] usb: xhci-mtk: remove unnecessary assignments in periodic TT scheduler

2021-03-30 Thread Ikjoon Jang
Remove unnecessary variables in check_sch_bw(). No functional changes, just for better readability. Signed-off-by: Ikjoon Jang --- drivers/usb/host/xhci-mtk-sch.c | 52 + 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/drivers/usb/host/xhci-mtk

[PATCH 2/2] usb: xhci-mtk: relax periodic TT bandwidth checking

2021-03-30 Thread Ikjoon Jang
best case budget instead of maximum number of complete-split when calculating byte budgets on lower speed bus Without this patch, a typical full speed audio headset with 3 periodic endpoints (audio isoc-in/out, input int-in) cannot be configured with xhci-mtk. Signed-off-by: Ikjoon Jang

[PATCH 0/2] usb: xhci-mtk: relax peridoc TT bandwidth checking

2021-03-30 Thread Ikjoon Jang
This series is for supporting typical full speed USB audio headsets with speaker, microphone, and control knobs together. With current implementation, such a device cannot be configured due to xhci-mtk's bandwidth allocation failure even when there's enough bandwidth available. Ikjo

Re: [PATCH] ALSA: usb-audio: Apply sample rate quirk to Logitech Connect

2021-03-28 Thread Ikjoon Jang
On Wed, Mar 24, 2021 at 8:49 PM Takashi Iwai wrote: > > On Wed, 24 Mar 2021 13:03:14 +0100, > Ikjoon Jang wrote: > > > > On Wed, Mar 24, 2021, 7:16 PM Joakim Tjernlund > > > > wrote: > > > > On Wed, 2021-03-24 at 18:51 +0800, Ikjoon Jang wrote:

[PATCH] ALSA: usb-audio: Apply sample rate quirk to Logitech Connect

2021-03-24 Thread Ikjoon Jang
://bugzilla.kernel.org/show_bug.cgi?id=203419 Signed-off-by: Ikjoon Jang --- sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index d3001fb18141..176437a441e6 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1521,6 +1521,7 @@ bool

Re: [PATCH] i2c: mediatek: Get device clock-stretch time via dts

2021-03-02 Thread Ikjoon Jang
Hi Qii, On Wed, Feb 3, 2021 at 6:43 PM wrote: > > From: Qii Wang > > tSU,STA/tHD,STA/tSU,STOP maybe out of spec due to device > clock-stretching or circuit loss, we could get device > clock-stretch time from dts to adjust these parameters > to meet the spec via EXT_CONF register. > > Signed-off-

[PATCH] arm64: dts: mt8183: Add power-domains properity to mfgcfg

2021-02-24 Thread Ikjoon Jang
mfgcfg clock is under MFG_ASYNC power domain Signed-off-by: Weiyi Lu Signed-off-by: Ikjoon Jang --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index

Re: [RFC v4 PATCH] usb: xhci-mtk: improve bandwidth scheduling with TT

2021-02-21 Thread Ikjoon Jang
xhci-mtk: supports bandwidth scheduling with > multi-TT") > Signed-off-by: Yaqii Wu > Signed-off-by: Chunfeng Yun Tested-by: Ikjoon Jang > --- > drivers/usb/host/xhci-mtk-sch.c | 270 +++- > drivers/usb/host/xhci-mtk.h | 8 +- > 2 files change

Re: [next PATCH] usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints

2021-02-01 Thread Ikjoon Jang
nt logs and > rename bw_ep_list_new as bw_ep_chk_list. > > Fixes: 1d69f9d901ef ("usb: xhci-mtk: fix unreleased bandwidth data") > Cc: stable > Signed-off-by: Chunfeng Yun Reviewed-and-tested-by: Ikjoon Jang > --- > drivers/usb/host/xhci-mtk-sch.c | 61 +++

Re: [v7,1/2] dt-binding: reset-controller: mediatek: add YAML schemas

2021-01-22 Thread Ikjoon Jang
On Fri, Jan 15, 2021 at 7:23 PM Crystal Guo wrote: > > Add a YAML documentation for Mediatek, which uses ti reset-controller > driver directly. The TI reset controller provides a common reset > management, and is suitable for Mediatek SoCs. > > Signed-off-by: Crystal Guo > --- > .../bindings/res

Re: [PATCH v5] usb: xhci-mtk: fix unreleased bandwidth data

2021-01-14 Thread Ikjoon Jang
On Thu, Jan 14, 2021 at 4:30 PM Chunfeng Yun wrote: > > Hi Ikjoon, > > On Tue, 2021-01-12 at 13:48 +0800, Ikjoon Jang wrote: > > On Fri, Jan 8, 2021 at 10:44 PM Mathias Nyman > > wrote: > > > > > > On 8.1.2021 8.11, Chunfeng Yun wrote: > > >

[PATCH v6] usb: xhci-mtk: fix unreleased bandwidth data

2021-01-13 Thread Ikjoon Jang
in reset_bandwidth() path. Fixes: 08e469de87a2 ("usb: xhci-mtk: supports bandwidth scheduling with multi-TT") Signed-off-by: Ikjoon Jang --- Changes in v6: - use xhci overrides instead of quirk functions for {check|reset}_bandwidth(). Changes in v5: - Fix a wrong commit id in

Re: [RFC PATCH v3 1/5] usb: xhci-mtk: improve bandwidth scheduling with multi-TT

2021-01-13 Thread Ikjoon Jang
On Tue, Dec 22, 2020 at 5:35 PM Chunfeng Yun wrote: > > From: Zhanyong Wang > > After inserted the usb type-c 3.5mm dongle with headset, dmesg showed: > usb 1-1.1: new full-speed USB device number 5 using xhci-mtk > usb 1-1.1: New USB device found, idVendor=05ac, idProduct=110a, > bcdDevice=26.1

Re: [PATCH v5] usb: xhci-mtk: fix unreleased bandwidth data

2021-01-11 Thread Ikjoon Jang
On Fri, Jan 8, 2021 at 10:44 PM Mathias Nyman wrote: > > On 8.1.2021 8.11, Chunfeng Yun wrote: > > On Thu, 2021-01-07 at 13:09 +0200, Mathias Nyman wrote: > >> On 29.12.2020 8.24, Ikjoon Jang wrote: > >>> xhci-mtk has hooks on add_endpoint() and drop_endpoint()

Re: [PATCH v5] usb: xhci-mtk: fix unreleased bandwidth data

2021-01-08 Thread Ikjoon Jang
On Fri, Jan 8, 2021 at 2:34 PM Chunfeng Yun wrote: > > On Tue, 2020-12-29 at 14:24 +0800, Ikjoon Jang wrote: > > xhci-mtk has hooks on add_endpoint() and drop_endpoint() from xhci > > to handle its own sw bandwidth managements and stores bandwidth data > > into i

Re: [PATCH v5] usb: xhci-mtk: fix unreleased bandwidth data

2021-01-07 Thread Ikjoon Jang
On Thu, Jan 7, 2021 at 7:07 PM Mathias Nyman wrote: > > On 29.12.2020 8.24, Ikjoon Jang wrote: > > xhci-mtk has hooks on add_endpoint() and drop_endpoint() from xhci > > to handle its own sw bandwidth managements and stores bandwidth data > > into internal table ever

Re: [PATCH v6 10/22] clk: mediatek: Add MT8192 basic clocks support

2021-01-06 Thread Ikjoon Jang
On Wed, Jan 6, 2021 at 7:06 PM Weiyi Lu wrote: > > On Wed, 2021-01-06 at 18:52 +0800, Ikjoon Jang wrote: > > On Wed, Jan 6, 2021 at 6:42 PM Weiyi Lu wrote: > > > > > > On Wed, 2021-01-06 at 18:25 +0800, Ikjoon Jang wrote: > > > > On Tu

Re: [PATCH v6 10/22] clk: mediatek: Add MT8192 basic clocks support

2021-01-06 Thread Ikjoon Jang
On Wed, Jan 6, 2021 at 6:42 PM Weiyi Lu wrote: > > On Wed, 2021-01-06 at 18:25 +0800, Ikjoon Jang wrote: > > On Tue, Dec 22, 2020 at 9:14 PM Weiyi Lu wrote: > > > > > > Add MT8192 basic clock providers, include topckgen, apmixedsys, > > > infracfg and peric

Re: [PATCH v6 08/22] clk: mediatek: Add configurable enable control to mtk_pll_data

2021-01-06 Thread Ikjoon Jang
_reg and pll_en_bit for enable control or > default 0 where pll data are static variables. > Hence, CON0_BASE_EN could also be removed. > And there might have another special case on other chips, > the enable bit is still on CON0 register but not at bit0. > > Signed-of

Re: [PATCH v6 07/22] clk: mediatek: Fix asymmetrical PLL enable and disable control

2021-01-06 Thread Ikjoon Jang
der enable mask. > And then we will make en_mask a pure divider enable mask in another > following patch series. > > Signed-off-by: Weiyi Lu Reviewed-by: Ikjoon Jang > --- > drivers/clk/mediatek/clk-pll.c | 20 > 1 file changed, 16 insertions(+), 4 del

Re: [PATCH v6 10/22] clk: mediatek: Add MT8192 basic clocks support

2021-01-06 Thread Ikjoon Jang
On Tue, Dec 22, 2020 at 9:14 PM Weiyi Lu wrote: > > Add MT8192 basic clock providers, include topckgen, apmixedsys, > infracfg and pericfg. > > Signed-off-by: Weiyi Lu > --- > drivers/clk/mediatek/Kconfig |8 + > drivers/clk/mediatek/Makefile |1 + > drivers/clk/mediatek/clk-mt8

Re: [RFC PATCH v3 4/5] usb: xhci-mtk: add support runtime pm

2020-12-28 Thread Ikjoon Jang
On Tue, Dec 22, 2020 at 5:35 PM Chunfeng Yun wrote: > > From: CK Hu > > add support runtime pm feature > > Signed-off-by: Zhanyong Wang > Signed-off-by: Chunfeng Yun > --- > v3: > 1. fix some issues > 2. remove attribute files > > v2: fix error caused by request irq suggested by CK > --- >

Re: [PATCH v4] usb: xhci-mtk: fix unreleased bandwidth data

2020-12-28 Thread Ikjoon Jang
On Mon, Dec 28, 2020 at 10:34 PM Greg Kroah-Hartman wrote: > > On Mon, Dec 14, 2020 at 04:39:53PM +0800, Ikjoon Jang wrote: > > xhci-mtk has hooks on add_endpoint() and drop_endpoint() from xhci > > to handle its own sw bandwidth managements and stores bandwidth data > > i

[PATCH v5] usb: xhci-mtk: fix unreleased bandwidth data

2020-12-28 Thread Ikjoon Jang
still remain at the table. This patch adds two more hooks from check_bandwidth() and reset_bandwidth(), and make mtk-xhci to releases all failed endpoints from reset_bandwidth(). Fixes: 08e469de87a2 ("usb: xhci-mtk: supports bandwidth scheduling with multi-TT") Signed-off-by: I

[PATCH v4] usb: xhci-mtk: fix unreleased bandwidth data

2020-12-14 Thread Ikjoon Jang
still remain at the table. This patch adds two more hooks from check_bandwidth() and reset_bandwidth(), and make mtk-xhci to releases all failed endpoints from reset_bandwidth(). Fixes: 4b0f7a77fb3c ("usb: xhci-mtk: supports bandwidth scheduling with multi-TT") Signed-off-by: I

[PATCH v3] usb: xhci-mtk: fix unreleased bandwidth data

2020-12-13 Thread Ikjoon Jang
still remain at the table. This patch adds two more hooks from check_bandwidth() and reset_bandwidth(), and make mtk-xhci to releases all failed endpoints from reset_bandwidth(). Fixes: 4b0f7a77fb3c ("usb: xhci-mtk: supports bandwidth scheduling with multi-TT") Signed-off-by: I

Re: [PATCH v2 0/3] Release allocated periodic bandwidth data from reset_bandwidth()

2020-12-10 Thread Ikjoon Jang
On Fri, Dec 11, 2020 at 9:53 AM Chunfeng Yun wrote: > > On Thu, 2020-12-10 at 18:47 +0800, Ikjoon Jang wrote: > > xhci-mtk releases allocated TT bandwidth data only when whole > > endpoints of a device are dropped as there're only {add|drop}_endpoint() > > hooks ar

Re: [PATCH v2 3/3] usb: xhci-mtk: fix unreleased bandwidth data

2020-12-10 Thread Ikjoon Jang
On Thu, Dec 10, 2020 at 6:57 PM Greg Kroah-Hartman wrote: > > On Thu, Dec 10, 2020 at 06:47:47PM +0800, Ikjoon Jang wrote: > > xhci-mtk has hooks on add_endpoint() and drop_endpoint() from xhci > > to handle its own sw bandwidth managements and stores bandwidth data > > i

[PATCH v2 1/3] usb: xhci-mtk: code cleanups in getting bandwidth table

2020-12-10 Thread Ikjoon Jang
Simplifies the codes for getting internal bandwidth data, No functional changes. Signed-off-by: Ikjoon Jang --- drivers/usb/host/xhci-mtk-sch.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk

[PATCH v2 2/3] usb: xhci-mtk: delay association of tt and ep

2020-12-10 Thread Ikjoon Jang
data, no functional changes. Signed-off-by: Ikjoon Jang --- drivers/usb/host/xhci-mtk-sch.c | 40 - 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c index c334b6d76479..439391f

[PATCH v2 3/3] usb: xhci-mtk: fix unreleased bandwidth data

2020-12-10 Thread Ikjoon Jang
still remain at the table. This patch adds two more hooks from check_bandwidth() and reset_bandwidth(), and make mtk-xhci to releases all failed endpoints from reset_bandwidth(). Fixes: 0cbd4b34cda9 ("xhci: mediatek: support MTK xHCI host controller") Signed-off-by: Ikjoon Jang ---

[PATCH v2 0/3] Release allocated periodic bandwidth data from reset_bandwidth()

2020-12-10 Thread Ikjoon Jang
0-day warning from unused variable - split one big patch into three patches - bugfix in hw flags Ikjoon Jang (3): usb: xhci-mtk: code cleanups in getting bandwidth table usb: xhci-mtk: delay association of tt and ep usb: xhci-mtk: fix unreleased bandwidth data drivers/usb/host/xhci-mtk-

Re: [v6, 3/3] reset-controller: ti: force the write operation when assert or deassert

2020-12-02 Thread Ikjoon Jang
On Wed, Dec 2, 2020 at 7:07 PM Crystal Guo wrote: > > On Mon, 2020-11-30 at 19:13 +0800, Ikjoon Jang wrote: > > On Wed, Sep 30, 2020 at 10:21:59AM +0800, Crystal Guo wrote: > > > Force the write operation in case the read already happens > > > to return the correct

Re: [v6, 3/3] reset-controller: ti: force the write operation when assert or deassert

2020-11-30 Thread Ikjoon Jang
On Wed, Sep 30, 2020 at 10:21:59AM +0800, Crystal Guo wrote: > Force the write operation in case the read already happens > to return the correct value. > > Signed-off-by: Crystal Guo > --- > drivers/reset/reset-ti-syscon.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --

Re: [v6,2/3] reset-controller: ti: introduce a new reset handler

2020-11-30 Thread Ikjoon Jang
h as reset-qcom-aoss.c, it integrates assert and deassert together > by 'reset' method. MTK Socs also need this method to perform reset. > > Signed-off-by: Crystal Guo Reviewed-by: Ikjoon Jang > --- > drivers/reset/reset-ti-syscon.c | 40

[PATCH] usb: xhci-mtk: fix unreleased bandwidth data

2020-11-29 Thread Ikjoon Jang
emain at the table. This patch adds two more hooks from check_bandwidth() and reset_bandwidth(), so mtk-xhci can releases all remaining allocations in reset_bandwidth(). Fixes: 0cbd4b34cda9 ("xhci: mediatek: support MTK xHCI host controller") Signed-off-by: Ikjoon Jang --- drivers/us

Re: [PATCH v5 23/24] arm64: dts: mediatek: Add mt8192 clock controllers

2020-11-22 Thread Ikjoon Jang
On Mon, Nov 09, 2020 at 10:03:48AM +0800, Weiyi Lu wrote: > Add clock controller nodes for SoC mt8192 > > Signed-off-by: Weiyi Lu > --- > arch/arm64/boot/dts/mediatek/mt8192.dtsi | 163 > +++ > 1 file changed, 163 insertions(+) > > diff --git a/arch/arm64/boot/dts/m

Re: [PATCH v5 07/24] clk: mediatek: Fix asymmetrical PLL enable and disable control

2020-11-17 Thread Ikjoon Jang
On Mon, Nov 09, 2020 at 10:03:32AM +0800, Weiyi Lu wrote: > In fact, the en_mask is a combination of divider enable mask > and pll enable bit(bit0). > Before this patch, we enabled both divider mask and bit0 in prepare(), > but only cleared the bit0 in unprepare(). > In the future, we hope en_mask

Re: [PATCH v1] spi: spi-mtk-nor: add axi clock control for MT8192 spi-nor

2020-11-16 Thread Ikjoon Jang
: bayi cheng Tested-by: Ikjoon Jang > --- > drivers/spi/spi-mtk-nor.c | 16 +++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c > index b97f26a..bf2d0f9 100644 > --- a/drivers/spi/sp

[PATCH v5 0/4] spi: spi-mtk-nor: Add mt8192 support.

2020-10-06 Thread Ikjoon Jang
x of v2 in checking spi memory operation. - split read_dma function into two (normal/bounce) - Support 7bytes generic spi xfer Changes in v2: - Add power management support - Fix bugs in checking spi memory operation. - use dma_alloc_coherent for allocating bounce buffer - code cleanups Ikjoon Jang

[PATCH v5 3/4] spi: spi-mtk-nor: support 36bit dma addressing

2020-10-06 Thread Ikjoon Jang
This patch enables 36bit dma address support to spi-mtk-nor. Currently this is enabled only for mt8192-nor. Signed-off-by: Ikjoon Jang --- drivers/spi/spi-mtk-nor.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi

[PATCH v5 1/4] dt-bindings: spi: add mt8192-nor compatible string

2020-10-06 Thread Ikjoon Jang
Add MT8192 spi-nor controller support. Signed-off-by: Ikjoon Jang Acked-by: Rob Herring --- Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml b/Documentation

[PATCH v5 4/4] spi: spi-mtk-nor: Add power management support

2020-10-06 Thread Ikjoon Jang
This patch adds dev_pm_ops to mtk-nor to support suspend/resume, auto suspend delay is set to -1 by default. Accessing registers are only permitted after its clock is enabled to deal with unknown state of operating clk at probe time. Signed-off-by: Ikjoon Jang --- drivers/spi/spi-mtk-nor.c

[PATCH v5 2/4] spi: spi-mtk-nor: use dma_alloc_coherent() for bounce buffer

2020-10-06 Thread Ikjoon Jang
Use dma_alloc_coherent() for bounce buffer instead of kmalloc() to make sure the bounce buffer to be allocated within its DMAable range. Signed-off-by: Ikjoon Jang --- drivers/spi/spi-mtk-nor.c | 94 ++- 1 file changed, 52 insertions(+), 42 deletions

Re: linux-next: Fixes tag needs some work in the battery tree

2020-10-05 Thread Ikjoon Jang
On Tue, Oct 6, 2020 at 11:57 AM Ikjoon Jang wrote: > > On Mon, Oct 5, 2020 at 7:50 PM Stephen Rothwell wrote: > > > > Hi all, > > > > In commit > > > > f9d293364b45 ("power: supply: sbs-battery: keep error code when > > get_property() fa

Re: linux-next: Fixes tag needs some work in the battery tree

2020-10-05 Thread Ikjoon Jang
On Mon, Oct 5, 2020 at 7:50 PM Stephen Rothwell wrote: > > Hi all, > > In commit > > f9d293364b45 ("power: supply: sbs-battery: keep error code when > get_property() fails") > > Fixes tag > > Fixes: c4f382930145 (power: supply: sbs-battery: don't assume i2c errors as > battery disconnect) >

[PATCH v4 3/4] spi: spi-mtk-nor: support 36bit dma addressing

2020-09-29 Thread Ikjoon Jang
This patch enables 36bit dma address support to spi-mtk-nor. Currently this is enabled only for mt8192-nor. Signed-off-by: Ikjoon Jang --- Changes in v4: - Fix 0-day ci warning from shifting 32bit value - Fix missing initialization of internal flags, 'high_dma' drivers/spi/spi-mtk-

[PATCH v4 2/4] spi: spi-mtk-nor: use dma_alloc_coherent() for bounce buffer

2020-09-29 Thread Ikjoon Jang
Use dma_alloc_coherent() for bounce buffer instead of kmalloc() to make sure the bounce buffer to be allocated within its DMAable range. Additionally, add an internal helper need_bounce() function checking whether op's data buffer is DMAable. Reviewed-by: Chuanhong Guo Signed-off-by: I

[PATCH v4 4/4] spi: spi-mtk-nor: Add power management support

2020-09-29 Thread Ikjoon Jang
This patch adds dev_pm_ops to mtk-nor to support suspend/resume, auto suspend delay is set to -1 by default. Accessing registers are only permitted after its clock is enabled to deal with unknown state of operating clk at probe time, Signed-off-by: Ikjoon Jang --- Changes in v4: - No changes

[PATCH v4 1/4] dt-bindings: spi: add mt8192-nor compatible string

2020-09-29 Thread Ikjoon Jang
Add MT8192 spi-nor controller support. Signed-off-by: Ikjoon Jang Acked-by: Rob Herring --- (no changes since v1) Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk

[PATCH v4 0/4] spi: spi-mtk-nor: Add mt8192 support.

2020-09-29 Thread Ikjoon Jang
al/bounce) - Support 7bytes generic spi xfer Changes in v2: - Add power management support - Fix bugs in checking spi memory operation. - use dma_alloc_coherent for allocating bounce buffer - code cleanups Ikjoon Jang (4): dt-bindings: spi: add mt8192-nor compatible string spi: spi-mtk-nor: us

[RESEND PATCH v4] mtd: spi-nor: winbond: Add support for w25q64jwm

2020-09-27 Thread Ikjoon Jang
Lin Tested-by: Nicolas Boichat Signed-off-by: Ikjoon Jang --- Changes in v4: - drops package type code from name Changes in v3: - fix commit message formats Changes in v2: - remove duplicated flash ID (w25q32jwm) drivers/mtd/spi-nor/winbond.c | 9 + 1 file changed, 9 insertions

Re: [PATCH v3 5/6] spi: spi-mtk-nor: support 36bit dma addressing

2020-09-27 Thread Ikjoon Jang
On Sun, Sep 27, 2020 at 4:30 PM Yingjoe Chen wrote: > > On Fri, 2020-09-25 at 14:54 +0800, Ikjoon Jang wrote: > > This patch enables 36bit dma address support to spi-mtk-nor. > > Currently this is enabled only for mt8192-nor. > > > > Signed-off-by: Ikjoon Jang >

Re: [PATCH v3 2/6] spi: spi-mtk-nor: fix mishandled logics in checking SPI memory operation

2020-09-25 Thread Ikjoon Jang
On Fri, Sep 25, 2020 at 2:54 PM Ikjoon Jang wrote: > > Fix a bug which limits its protocol availability in supports_op(). > > Fixes: a59b2c7c56bf ("spi: spi-mtk-nor: support standard spi properties") > Signed-off-by: Ikjoon Jang > --- This is also duplicated work of

Re: [PATCH v3 3/6] spi: spi-mtk-nor: support 7 bytes transfer of generic spi

2020-09-25 Thread Ikjoon Jang
On Fri, Sep 25, 2020 at 3:47 PM Chuanhong Guo wrote: > > Hi! > > On Fri, Sep 25, 2020 at 2:55 PM Ikjoon Jang wrote: > > > > When mtk-nor fallbacks to generic spi transfers, it can actually > > transfer up to 7 bytes. > > generic transfer_one_message should

Re: [PATCH v3 5/6] spi: spi-mtk-nor: support 36bit dma addressing

2020-09-25 Thread Ikjoon Jang
On Fri, Sep 25, 2020 at 4:27 PM Chuanhong Guo wrote: > [snip] > > + if (sp->high_dma) { > > + writel(dma_addr >> 32, sp->base + MTK_NOR_REG_DMA_DADR_HB); > > + writel((dma_addr + length) >> 32, sp->base + > > MTK_NOR_REG_DMA_END_DADR_HB); > > + } > > I re

[PATCH v3 3/6] spi: spi-mtk-nor: support 7 bytes transfer of generic spi

2020-09-24 Thread Ikjoon Jang
When mtk-nor fallbacks to generic spi transfers, it can actually transfer up to 7 bytes. This patch fixes adjust_op_size() and supports_op() to explicitly check 7 bytes range and also fixes possible under/overflow conditions in register offsets calculation. Signed-off-by: Ikjoon Jang --- (no

[PATCH v3 2/6] spi: spi-mtk-nor: fix mishandled logics in checking SPI memory operation

2020-09-24 Thread Ikjoon Jang
Fix a bug which limits its protocol availability in supports_op(). Fixes: a59b2c7c56bf ("spi: spi-mtk-nor: support standard spi properties") Signed-off-by: Ikjoon Jang --- (no changes since v1) drivers/spi/spi-mtk-nor.c | 26 +++--- 1 file changed, 11 inserti

[PATCH v3 6/6] spi: spi-mtk-nor: Add power management support

2020-09-24 Thread Ikjoon Jang
This patch adds dev_pm_ops to mtk-nor to support suspend/resume, auto suspend delay is set to -1 by default. Accessing registers are only permitted after its clock is enabled to deal with unknown state of operating clk at probe time, Signed-off-by: Ikjoon Jang --- Changes in v3: - Fix a bugfix

[PATCH v3 1/6] dt-bindings: spi: add mt8192-nor compatible string

2020-09-24 Thread Ikjoon Jang
Add MT8192 spi-nor controller support. Signed-off-by: Ikjoon Jang Acked-by: Rob Herring --- (no changes since v1) Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk

[PATCH v3 0/6] spi: spi-mtk-nor: Add mt8192 support

2020-09-24 Thread Ikjoon Jang
in checking spi memory operation. - use dma_alloc_coherent for allocating bounce buffer - code cleanups Ikjoon Jang (6): dt-bindings: spi: add mt8192-nor compatible string spi: spi-mtk-nor: fix mishandled logics in checking SPI memory operation spi: spi-mtk-nor: support 7 bytes transfer of

[PATCH v3 5/6] spi: spi-mtk-nor: support 36bit dma addressing

2020-09-24 Thread Ikjoon Jang
This patch enables 36bit dma address support to spi-mtk-nor. Currently this is enabled only for mt8192-nor. Signed-off-by: Ikjoon Jang --- (no changes since v1) drivers/spi/spi-mtk-nor.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-mtk

[PATCH v3 4/6] spi: spi-mtk-nor: use dma_alloc_coherent() for bounce buffer

2020-09-24 Thread Ikjoon Jang
Use dma_alloc_coherent() for bounce buffer instead of kmalloc() to make sure the bounce buffer to be allocated within its DMAable range. Signed-off-by: Ikjoon Jang --- (no changes since v1) drivers/spi/spi-mtk-nor.c | 93 +-- 1 file changed, 51 insertions

Re: [PATCH v2 4/5] spi: spi-mtk-nor: support 36bit dma addressing to mediatek

2020-09-20 Thread Ikjoon Jang
On Sat, Sep 19, 2020 at 11:26 PM Yingjoe Chen wrote: > > On Fri, 2020-09-18 at 16:31 +0800, Ikjoon Jang wrote: > > This patch enables 36bit dma address support to spi-mtk-nor. > > Currently 36bit dma addressing is enabled only for mt8192-nor. [snip] > > Do we need to set s

Re: [PATCH v2 3/5] spi: spi-mtk-nor: use dma_alloc_coherent() for bounce buffer

2020-09-20 Thread Ikjoon Jang
On Fri, Sep 18, 2020 at 9:25 PM Chuanhong Guo wrote: > > Hi! > > On Fri, Sep 18, 2020 at 4:35 PM Ikjoon Jang wrote: > > > > Use dma_alloc_coherent() for bounce buffer instead of kmalloc. > > The commit message should explain why such a change is > needed. (i.e.

Re: [PATCH v2 2/5] spi: spi-mtk-nor: fix mishandled logics in checking SPI memory operation

2020-09-20 Thread Ikjoon Jang
On Fri, Sep 18, 2020 at 9:09 PM Chuanhong Guo wrote: > > Hi! > > On Fri, Sep 18, 2020 at 4:34 PM Ikjoon Jang wrote: > > > > Fix a simple bug which can limits its transfer size, > > and add a simple helper function for code cleanups. > > > > Fixes

[PATCH v2 1/5] dt-bindings: spi: add mt8192-nor compatible string

2020-09-18 Thread Ikjoon Jang
Add compatible string for mt8192 SoC. Signed-off-by: Ikjoon Jang --- (no changes since v1) Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml b/Documentation

[PATCH v2 3/5] spi: spi-mtk-nor: use dma_alloc_coherent() for bounce buffer

2020-09-18 Thread Ikjoon Jang
Use dma_alloc_coherent() for bounce buffer instead of kmalloc. Signed-off-by: Ikjoon Jang --- (no changes since v1) drivers/spi/spi-mtk-nor.c | 60 +++ 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi

[PATCH v2 5/5] spi: spi-mtk-nor: Add power management support

2020-09-18 Thread Ikjoon Jang
This patch adds dev_pm_ops to mtk-nor to support suspend/resume, auto suspend delay is set to -1 by default. Accessing registers are delayed after enabling clocks to deal with unknown state of clocks at probe time, Signed-off-by: Ikjoon Jang --- drivers/spi/spi-mtk-nor.c | 105

[PATCH v2 0/5] spi: spi-mtk-nor: Add mt8192 support.

2020-09-18 Thread Ikjoon Jang
This patchset adds 36bit dma address and power management supports for mt8192-nor. Changes in v2: - Add power management support - Fix bugs in checking spi memory operation. - use dma_alloc_coherent for allocating bounce buffer - code cleanups Ikjoon Jang (5): dt-bindings: spi: add mt8192-nor

[PATCH v2 4/5] spi: spi-mtk-nor: support 36bit dma addressing to mediatek

2020-09-18 Thread Ikjoon Jang
This patch enables 36bit dma address support to spi-mtk-nor. Currently 36bit dma addressing is enabled only for mt8192-nor. Signed-off-by: Ikjoon Jang --- (no changes since v1) drivers/spi/spi-mtk-nor.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a

[PATCH v2 2/5] spi: spi-mtk-nor: fix mishandled logics in checking SPI memory operation

2020-09-18 Thread Ikjoon Jang
Fix a simple bug which can limits its transfer size, and add a simple helper function for code cleanups. Fixes: a59b2c7c56bf ("spi: spi-mtk-nor: support standard spi properties") Signed-off-by: Ikjoon Jang --- (no changes since v1) drivers/spi/spi-mtk-

[PATCH v4] mtd: spi-nor: winbond: Add support for w25q64jwm

2020-09-14 Thread Ikjoon Jang
Add support Winbond w25q{64,128,256}jwm which are identical to existing w25q32jwm except for their sizes. This was tested with w25q64jwm, basic erase/write/readback and lock/unlock top and bottom blocks were okay. Signed-off-by: Ikjoon Jang Signed-off-by: Xingyu Wu Signed-off-by: ST Lin

[PATCH 2/2] spi: spi-mtk-nor: support 36bit dma addressing to mediatek spi-nor

2020-09-09 Thread Ikjoon Jang
This patch enables direct mappings over 32bit range to spi-mtk-nor. Signed-off-by: Ikjoon Jang --- drivers/spi/spi-mtk-nor.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c index 6e6ca2b8e6c8

[PATCH 1/2] dt-bindings: spi: add mt8192-nor compatible string

2020-09-09 Thread Ikjoon Jang
Add MT8192 spi-nor controller binding. Signed-off-by: Ikjoon Jang --- Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml b/Documentation/devicetree/bindings/spi

[PATCH 0/2] Add 36bit dma support to mediatek spi-nor controller.

2020-09-09 Thread Ikjoon Jang
mt8192-nor has 36bit addressing support, this patch adds 36bit address handlings to spi-mtk-nor. Ikjoon Jang (2): dt-bindings: spi: add mt8192-nor compatible string spi: spi-mtk-nor: support 36bit dma addressing to mediatek spi-nor .../bindings/spi/mediatek,spi-mtk-nor.yaml| 1

[PATCH] power: supply: sbs-battery: keep error code when get_property() fails

2020-09-02 Thread Ikjoon Jang
don't assume i2c errors as battery disconnect) Signed-off-by: Ikjoon Jang --- Sorry, I missed an case with present state unchanged. Sebastian, if you're okay with this patch, I think this could be squashed into original commit c4f382930145 in your branch. --- drivers/power/supply/sbs

[PATCH v4] power: supply: sbs-battery: don't assume i2c errors as battery disconnect

2020-08-27 Thread Ikjoon Jang
and other following commands were successful. This patch provides a unified way of checking presence by calling sbs_get_battery_presence_and_health() when detect pin is not used. Signed-off-by: Ikjoon Jang --- v4: rebase from merge conflict, amend commit messages v3: check retur

[PATCH] spi: spi-mtk-nor: support standard spi properties

2020-08-26 Thread Ikjoon Jang
Use default supports_op() to support spi-[rt]x-bus-width properties. And check dummy op's byte length instead of its bus width for output. Signed-off-by: Ikjoon Jang --- drivers/spi/spi-mtk-nor.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --

[PATCH v2] dt-bindings: spi: Convert spi-mtk-nor to json-schema

2020-08-26 Thread Ikjoon Jang
Convert Mediatek ARM SOC's serial NOR flash controller binding to json-schema format. Signed-off-by: Ikjoon Jang --- v2: remove unnecessary quotes, set interrupts as required, add unevaluatedProperties:false --- .../bindings/spi/mediatek,spi-mtk-nor.yaml

[PATCH] dt-bindings: spi: Convert spi-mtk-nor to json-schema

2020-08-19 Thread Ikjoon Jang
Convert Mediatek ARM SOC's serial NOR flash controller binding to json-schema format. Signed-off-by: Ikjoon Jang --- .../bindings/spi/mediatek,spi-mtk-nor.yaml| 82 +++ .../devicetree/bindings/spi/spi-mtk-nor.txt | 47 --- 2 files changed, 82 insertions(+

[PATCH v3 1/2] power: supply: sbs-battery: combine get_presence_and_health

2020-08-12 Thread Ikjoon Jang
This patch enables calling sbs_get_battery_presence_and_health() without checking its chip type. No functional changes. Signed-off-by: Ikjoon Jang --- drivers/power/supply/sbs-battery.c | 73 +++--- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/drivers

[PATCH v3 2/2] power: supply: sbs-battery: don't assume i2c errors as battery disconnect

2020-08-12 Thread Ikjoon Jang
d was requested and other following commands were successful, e.g. udev rules tries to read multiple properties. This patch checks battery presence by reading known good command to check battery existence. Signed-off-by: Ikjoon Jang --- drivers/power/supply/sbs-battery.c | 25 +--

[PATCH v3 0/2] power: supply: sbs-battery: fix presence check

2020-08-12 Thread Ikjoon Jang
get_presence_and_health functions to reuse Ikjoon Jang (2): power: supply: sbs-battery: combine get_presence_and_health power: supply: sbs-battery: don't assume i2c errors as battery disconnect drivers/power/supply/sbs-battery.c | 98 -- 1 file change

[PATCH v2 2/2] power: supply: sbs-battery: don't assume every i2c errors as battery disconnect

2020-08-10 Thread Ikjoon Jang
d was requested and other following commands were successful, e.g. udev rules tries to read multiple properties. This patch checks battery presence by reading known good command to check battery existence. Signed-off-by: Ikjoon Jang --- v2: fix return value checking of sbs_get_battery_presence_and_h

[PATCH v2 1/2] power: supply: sbs-battery: combine get_presence_and_health

2020-08-10 Thread Ikjoon Jang
This patch combines two different sbs_get_battery_presence_and_health() for reuse in the future. No functional changes. Signed-off-by: Ikjoon Jang --- drivers/power/supply/sbs-battery.c | 73 +++--- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/drivers

  1   2   >