devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Svyatoslav Ryhel <clamor95@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Lee Jones <lee@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	 Jonathan Hunter <jonathanh@nvidia.com>,
	Sebastian Reichel <sre@kernel.org>,
	devicetree@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-tegra@vger.kernel.org,  linux-pm@vger.kernel.org
Subject: Re: [PATCH v1 2/4] dt-bindings: mfd: Document Infineon/Cypress CG7153AM MCU
Date: Mon, 24 Mar 2025 19:05:58 +0200	[thread overview]
Message-ID: <CAPVz0n3=-QL1_NGP31WX_4LQBt5-T47BbU_yn6td1zk9C2T=iA@mail.gmail.com> (raw)
In-Reply-To: <20250324165257.GA458528-robh@kernel.org>

пн, 24 бер. 2025 р. о 18:52 Rob Herring <robh@kernel.org> пише:
>
> On Sun, Mar 23, 2025 at 09:14:22AM +0200, Svyatoslav Ryhel wrote:
> > Add binding for Cypress CG7153AM embedded controller. Pegatron implemented
> > a custom configuration of this MCU in their Chagall tablets, utilizing it
> > for battery monitoring.
> >
> > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > ---
> >  .../bindings/mfd/cypress,cg7153am.yaml        | 55 +++++++++++++++++++
> >  1 file changed, 55 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/mfd/cypress,cg7153am.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/cypress,cg7153am.yaml b/Documentation/devicetree/bindings/mfd/cypress,cg7153am.yaml
> > new file mode 100644
> > index 000000000000..f8469b5e3816
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mfd/cypress,cg7153am.yaml
> > @@ -0,0 +1,55 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/mfd/cypress,cg7153am.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Infineon/Cypress Semicon CG7153AM Microcontroller
> > +
> > +maintainers:
> > +  - Svyatoslav Ryhel <clamor95@gmail.com>
> > +
> > +description:
> > +  The CG7153AM, an 8-bit programmable microcontroller from Infineon/Cypress
> > +  Semiconductor, communicates over I2C and is implemented in devices like the
> > +  Pegatron Chagall tablet for fuel gauge and battery control functions.
> > +
> > +$ref: /schemas/power/supply/power-supply.yaml
> > +
> > +properties:
> > +  compatible:
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - pegatron,chagall-ec # Pegatron Chagall tablet device
> > +          - const: cypress,cg7153am
> > +      - items:
> > +          const: cypress,cg7153am
>
> Is this just some general purpose uC which could be used for anything
> and the interface exposed is Pegatron's invention. If so, then I'd drop
> the cypress,cg7153am compatible. What use would it be to software?
>

Yeah, Cypress made an MPU, Pegatron used it as a base to make a fuel gauge.

You propose smth like this?

      - items:
          - enum:
              - pegatron,chagall-ec # Pegatron Chagall tablet device
          - const: cypress,cg7153am

Without oneOf and second item or remove cypress,cg7153am entirely and
submit as pegatron,chagall-ec.yaml? Just to be clear.

I am fine with removing oneOf and items: const: cypress,cg7153am, but
I would like to preserve cypress,cg7153am as second compatible since
this is an actual MCU model.

Thanks.

> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  monitored-battery: true
> > +  power-supplies: true
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > +  - |
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        embedded-controller@10 {
> > +            compatible = "pegatron,chagall-ec", "cypress,cg7153am";
> > +            reg = <0x10>;
> > +
> > +            monitored-battery = <&battery>;
> > +            power-supplies = <&mains>;
> > +        };
> > +    };
> > +...
> > --
> > 2.43.0
> >

  reply	other threads:[~2025-03-24 17:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-23  7:14 [PATCH v1 0/4] power: supply: add support for Pegatron Chagall battery Svyatoslav Ryhel
2025-03-23  7:14 ` [PATCH v1 1/4] dt-bindings: vendor-prefixes: add prefix for Pegatron Corporation Svyatoslav Ryhel
2025-03-24 16:53   ` Rob Herring
2025-03-23  7:14 ` [PATCH v1 2/4] dt-bindings: mfd: Document Infineon/Cypress CG7153AM MCU Svyatoslav Ryhel
2025-03-24 16:52   ` Rob Herring
2025-03-24 17:05     ` Svyatoslav Ryhel [this message]
2025-03-25  2:59       ` Rob Herring
2025-03-25  6:57         ` Svyatoslav Ryhel
2025-03-23  7:14 ` [PATCH v1 3/4] power/supply: Add driver for Pegatron Chagall battery Svyatoslav Ryhel
2025-03-23  7:14 ` [PATCH v1 4/4] ARM: tegra: chagall: Add embedded controller node Svyatoslav Ryhel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPVz0n3=-QL1_NGP31WX_4LQBt5-T47BbU_yn6td1zk9C2T=iA@mail.gmail.com' \
    --to=clamor95@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).